Tech ENABLE_GL_SHADERS_ATTRIBUTES - Added shaders for glsl version 140
This commit is contained in:
parent
4964d6ecd5
commit
76d1d4949b
69 changed files with 994 additions and 309 deletions
19
resources/shaders/140/toolpaths_cog.fs
Normal file
19
resources/shaders/140/toolpaths_cog.fs
Normal file
|
@ -0,0 +1,19 @@
|
|||
#version 140
|
||||
|
||||
const vec4 BLACK = vec4(vec3(0.1), 1.0);
|
||||
const vec4 WHITE = vec4(vec3(1.0), 1.0);
|
||||
|
||||
const float emission_factor = 0.25;
|
||||
|
||||
uniform vec3 world_center;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
in vec2 intensity;
|
||||
in vec3 world_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 delta = world_position - world_center;
|
||||
vec4 color = delta.x * delta.y * delta.z > 0.0 ? BLACK : WHITE;
|
||||
gl_FragColor = vec4(vec3(intensity.y) + color.rgb * (intensity.x + emission_factor), 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue