Remove unused g_num_layers from grass shaders
This commit is contained in:
parent
7df5690f08
commit
affad6c43f
2 changed files with 1 additions and 3 deletions
|
@ -32,7 +32,6 @@ uniform float osg_SimulationTime;
|
|||
varying in vec2 g_rawpos; // Horizontal position in model space
|
||||
varying in float g_distance_to_eye; // Distance to the camera. Layers were disregarded
|
||||
flat in float g_layer; // The layer where the fragment lives (0-1 range)
|
||||
flat in int g_num_layers;
|
||||
|
||||
float rand2D(in vec2 co);
|
||||
float Noise2D(in vec2 co, in float wavelength);
|
||||
|
|
|
@ -13,7 +13,7 @@ varying in vec3 v_normal[3];
|
|||
varying out vec2 g_rawpos;
|
||||
varying out float g_distance_to_eye;
|
||||
flat varying out float g_layer;
|
||||
flat varying out int g_num_layers;
|
||||
|
||||
|
||||
|
||||
float min3(in float a, in float b, in float c)
|
||||
|
@ -34,7 +34,6 @@ void main()
|
|||
//float avgDistance = (distances[0]+distances[1]+distances[2])*0.33;
|
||||
|
||||
int numLayers = MIN_LAYERS + int(smoothstep(500.0, 50.0, minDistance) * float(MAX_MINUS_MIN_LAYERS));
|
||||
g_num_layers = numLayers;
|
||||
|
||||
float deltaLayer = 1.0 / float(numLayers);
|
||||
float currDeltaLayer = deltaLayer * 0.5;
|
||||
|
|
Loading…
Add table
Reference in a new issue