loop
if
if
call
endif
if
break
endif
endif
endloop
And while we're discussing the cloth demo, why is the cloth simulation being run in pixel shaders rather than vertex shaders?
From reading the shader code.Ailuros said:Where does that one come from?
Because IIRC it encodes the cloth's current physical state into two textures that store the positions and normals for a given number of points on a grid, and the cloth simulation fragment shader samples the values of the proximate neighbors of the current point being recalculated, determines the new position and normal of that point, and then outputs this into two render targets that represent the updated state of the cloth.Jawed said:And while we're discussing the cloth demo, why is the cloth simulation being run in pixel shaders rather than vertex shaders? Is it because there are more pixel pipelines (i.e. it'll run faster)?
Jawed said:And while we're discussing the cloth demo, why is the cloth simulation being run in pixel shaders rather than vertex shaders? Is it because there are more pixel pipelines (i.e. it'll run faster)?