updated makefile for supporting different target architectures
use "ARCH=arch_name make" restructured project folder, implementations and headers together under sources/
This commit is contained in:
24
sources/GL_STUFF/EFFECTS/CRT_SHADER/fragmentShader_particles.glsl
Executable file
24
sources/GL_STUFF/EFFECTS/CRT_SHADER/fragmentShader_particles.glsl
Executable file
@@ -0,0 +1,24 @@
|
||||
#version 430 core
|
||||
|
||||
layout (location = 0) out vec4 color;
|
||||
layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
|
||||
|
||||
in vec4 particleColor;
|
||||
|
||||
uniform uint pixelWidth;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
color = vec4(particleColor.xyz, 1.0f);
|
||||
/*
|
||||
color.r *= ((mod(gl_FragCoord.x, 8) != 0) && (mod(gl_FragCoord.y, 8) != 0) && (mod(gl_FragCoord.x, 8) != 1) && (mod(gl_FragCoord.y, 8) != 1))? 0 : 1;
|
||||
color.g *= ((mod(gl_FragCoord.x, 8) != 2) && (mod(gl_FragCoord.y, 8) != 2) && (mod(gl_FragCoord.x, 8) != 3) && (mod(gl_FragCoord.y, 8) != 3))? 0 : 1;
|
||||
color.b *= ((mod(gl_FragCoord.x, 8) != 4) && (mod(gl_FragCoord.y, 8) != 4) && (mod(gl_FragCoord.x, 8) != 5) && (mod(gl_FragCoord.y, 8) != 5))? 0 : 1;
|
||||
*/
|
||||
float mx = mod(roundEven(gl_FragCoord.x), 4 * pixelWidth);
|
||||
float my = mod(roundEven(gl_FragCoord.y), 4 * pixelWidth);
|
||||
|
||||
color.r *= ((mx < pixelWidth) && (my < pixelWidth * 3)) ? 0.8 : 0.3;
|
||||
color.g *= ((mx > pixelWidth && mx < pixelWidth * 2) && (my < pixelWidth * 3)) ? 1 : 0.4;
|
||||
color.b *= ((mx > pixelWidth * 2 && mx < pixelWidth * 3) && (my < pixelWidth * 3)) ? 1 : 0.4;
|
||||
}
|
||||
Reference in New Issue
Block a user