Support for VanillaBean shaders
ruvaldak opened this issue ยท 5 comments
I are sad. The shaders I've been working on don't work on Iris u.u
Fresh 1.17.1 instance, Iris compiled from 1.17 branch commit d574f98, Sodium compiled from https://github.com/IrisShaders/sodium-fabric 1.17.x/iris branch commit IrisShaders/sodium-fabric@fd9dcc0
What do you mean by "don't work"? There's nothing obviously wrong that I can see in the logs.
What do you mean by "don't work"? There's nothing obviously wrong that I can see in the logs.
This obviously isn't the intended look lol. VanillaBean is based on VanillAA, which in turn is based on XorDev default, both of which work fine on Iris and look as intended. VanillaBean, however, is pretty heavily edited to add in SSAO. It does work correctly on Optifine, of course.
#version 120
#extension GL_ARB_shader_texture_lod : enable
uniform mat4 gbufferProjectionInverse;
#ifdef GLSLANG
#extension GL_GOOGLE_include_directive : enable
#endif
varying vec2 texCoord;
uniform sampler2D colortex0;
uniform sampler2D colortex5;
uniform sampler2D depthtex0;
uniform float viewWidth;
uniform float viewHeight;
#include "settings.glsl"
void main()
{
#ifdef SSAO
//fast simple small bilateral blur by gri573
int size = AO_BLUR_SIZE;
float clarity = AO_BLUR_CLARITY;
float col = texture2D(colortex5, texCoord).r;
float weight = AO_BLUR_WEIGHT;
float col1 = 0.0;
for(int i = 0; i < size; i++) {
for(int j = 0; j < size; j++) {
float col0 = texture2D(colortex5, texCoord + (vec2(i, j) - 0.5 * vec2(size)) / vec2(viewWidth, viewHeight)).r;
float weight0 = max(1.0 - clarity * length(col0 - col), 0.00001);
col1 += weight0 * col0;
weight += weight0;
}
}
col = col1 / weight;
/*DRAWBUFFERS:0*/
gl_FragData[0] = vec4(texture2D(colortex0, texCoord).rgb * col,1.0);
#endif
}
Something about this being my deferred1.fsh is leading to Iris being incapable of rendering VanillaBean correctly.
Fixed with ruvaldak/VanillaBean-shaders@e7bc1c2