3

it seems that in HLSL i can but dont have to provide the uniform keyword for variables which come from the application. right?

why is that so?

clamp
  • 33,000
  • 75
  • 203
  • 299

1 Answers1

6

In HLSL global variables are considered uniform by default.

It's also settled that a variable coming out of the vertex shader stage for example is varying (HLSL doesn't need this keyword at all!).

Note that GLSL keywords uniform/varying are inherited from RSL (RenderMan shading language).

elmattic
  • 12,046
  • 5
  • 43
  • 79