Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 150
- #moj_import <fog.glsl>
- uniform sampler2D Sampler0;
- uniform vec4 ColorModulator;
- uniform float FogStart;
- uniform float FogEnd;
- uniform vec4 FogColor;
- uniform vec4 Color;
- in float vertexDistance;
- in vec4 vertexColor;
- in vec2 texCoord0;
- out vec4 fragColor;
- // Color --> vec4(r, g, b, alpha)
- void main() {
- vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator;
- if (color.a < 0.1) {
- discard;
- }
- // Static Colors
- vec3 RED = vec3(1.0, 0.0, 0.0); //RED
- vec3 GREEN = vec3(0.0, 1.0, 0.0); //GREEN
- vec3 BLUE = vec3(0.0, 0.0, 1.0); //BLUE
- // Filter Colors
- vec3 rawColor = Color.xyz;
- float opacity = Color.a;
- if (rawColor == RED) { // Filter RED
- fragColor = vec4(GREEN, opacity);
- } else { // Display Default
- fragColor = linear_fog(vertexColor, vertexDistance, FogStart, FogEnd, FogColor);
- }
- }
- //linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); - VANILLA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement