Random changes

This commit is contained in:
2025-04-16 03:35:57 -04:00
parent e51b42f01f
commit 53590ab2d0
4 changed files with 36 additions and 6 deletions

View File

@@ -238,13 +238,9 @@ protected:
private:
};
int main(int argc, char** argv) {
ReWindow::Logger::Debug.EnableConsole(false);
auto* program = new ReShaderProgram();
program->Open();
@@ -255,6 +251,5 @@ int main(int argc, char** argv) {
while (program->IsAlive())
program->ManagedRefresh();
return 0;
}

34
shaders/blur.frag.glsl Normal file
View File

@@ -0,0 +1,34 @@
#version 120
in VS_OUT
{
noperspective vec2 uv;
} IN;
out vec4 outColor;
uniform sampler2D offscreen;
const vec4[] gaussKernel3x3 =
{
vec4(-1.0, -1.0, 0.0, 1.0 / 16.0),
vec4(-1.0, 0.0, 0.0, 2.0 / 16.0),
vec4(-1.0, +1.0, 0.0, 1.0 / 16.0),
vec4( 0.0, -1.0, 0.0, 2.0 / 16.0),
vec4( 0.0, 0.0, 0.0, 4.0 / 16.0),
vec4( 0.0, +1.0, 0.0, 2.0 / 16.0),
vec4(+1.0, -1.0, 0.0, 1.0 / 16.0),
vec4(+1.0, 0.0, 0.0, 2.0 / 16.0),
vec4(+1.0, +1.0, 0.0, 1.0 / 16.0),
};
void main(void)
{
const vec2 texelSize = vec2(1.0) / textureSize(offscreen, 0);
vec4 color = vec4(0.0);
for (int i = 0; i < gaussKernel3x3.length(); ++i)
color += gaussKernel3x3[i].w * texture(offscreen, IN.uv + texelSize * gaussKernel3x3[i].xy);
outColor = color;
}

0
shaders/blur.vert.glsl Normal file
View File

View File

@@ -1,5 +1,6 @@
#version 120
void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
//gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_Position = ftransform();
}