Particle shaders

Overview

Particles use a standard default shader specially intended for particles that differs from the gfx standard default shader.
Under CreativeStudio, the default shader applied to a model is selected automatically. It does not need to be selected by the user even during binary output.
Even on actual hardware, there is no particular procecure that must be executed.
However, there is increased processing cost from switching shaders when mixing 3D models and rendering. Rendering is therefore faster if it is split up for 3D models and particles. In GraphicsSystem of the demo library, this type of layering is performed as standard.

Geometry shaders

The geometry shaders used with NintendoWare particles differ from the geometry shaders used with DMP particles.
Geometry shaders used for NintendoWare particles function as follows. Do not use geometry shaders as specifications are subject to future change without prior notice.

Input register

Name Registers Number Description
position v0 1 Center position.
quaternion v1 1 Quaternion.
view v2 1 View.
color v3 1 The color.
texcoord v4 1 Center of texture coordinate.
texoffset v5 1 Base vector for texture coordinates.
posoffset1 v6 1 Base vector 1 for position.
posoffset2 v7 1 Base vector 2 for position.

Four vertices are created from one vertex worth of data from the input register.

Vertex information to output

Vertex number Position Texture coordinates
0 position + posoffset1 texcoord.xy + texoffset.xy + texoffset.zw
1 position - posoffset2 texcoord.xy + texoffset.xy
2 position + posoffset2 texcoord.xy + texoffset.zw
3 position – posoffset1 texcoord.xy

Other attributes are shared in common by all four vertices, and the contents of the input register are output as-is.

Vertex shader limitations

Because vertex shaders are unlike default shaders for 3D models, out of all material features, most features realized using vertex shaders cannot be used. These features will be implemented in the fugure in order of necessity.
Currently,

are supported.

Only one set of texture coordinates is generated. The same content is output for texcoord0 and texcoord1.


CONFIDENTIAL