Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uniform keyword in HLSL

Tags:

directx

hlsl

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?

like image 732
clamp Avatar asked Sep 15 '25 14:09

clamp


1 Answers

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).

like image 67
Stringer Avatar answered Sep 17 '25 20:09

Stringer