What's happens on default fragment shader in CG shader language?

336 Views Asked by At

I have code on CG. In this code vertex shader emit 3 parameters: vertex position (float4), texture coordinates (float2) and color (float4). But fragment program not defined. How shader use this 2 parameters (uv and color) on fragment shader?

1

There are 1 best solutions below

2
On

Why not just define a fragment shader?

IIRC the default is to use the vertex value you assign to the connector register COLOR0 and no lighting. The texture assignment would need to be done by the OpenGL state machine (but you didn't tell us what context you're running in, so it might be DirectX, or who knows....)