Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 330 core
- // for snow rendering
- layout (location = 0) in vec3 aPos;
- uniform mat4 model;
- uniform mat4 view;
- uniform mat4 projection;
- void main()
- {
- gl_Position = projection * view * model * vec4(aPos, 1.0);
- }
- #version 330
- out vec4 FragColor;
- uniform sampler3D volumeData;
- void main()
- {
- ivec3 size = textureSize(volumeData, 0);
- float c = texture3D(volumeData, vec3(0)).x;
- if (size.x == 1)
- FragColor = vec4(1.0, 0.0, c, 1.0);
- else if (size.x > 2)
- FragColor = vec4(0.0, 1.0, 0.0, 1.0);
- else if (size.x == 0)
- FragColor = vec4(0.0, 0.0, 1.0, 1.0);
- else
- FragColor = vec4(1.0, 1.0, 1.0, 1.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement