The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

[Rep/+] Job 2.5 - Over 25 (+45) New Unlocks!
 This topic has been pinned, so it's probably important
AgentCucco  [developer] 20 Mar, 2022 @ 8:01am
I use Mac/Linux and my screen is black!
Currently the Caregiver shader is bugged on these OSs, until I post an update that fixes it, you can choose to

a) Delete the shaders.xml file and get rid of the shader completely.

b) Replace the contents of the shaders.xml file with this:

<shaders> <shader name="Caregiver Old Film"> <parameters> <param name="RandomValueIn" type="float"/> <param name="TimeLapseIn" type="float"/> <param name="InnerVignettingIn" type="float"/> <param name="OuterVignettingIn" type="float"/> <param name="SepiaValueIn" type="float"/> <param name="NoiseValueIn" type="float"/> <param name="ScratchValueIn" type="float"/> <param name="BrightnessValueIn" type="float"/> <param name="DisableShaderIn" type="float"/> </parameters> <vertex><![CDATA[ attribute vec3 Position; attribute vec4 Color; attribute vec2 TexCoord; attribute vec4 RenderData; attribute float Scale; attribute vec3 Vertex; attribute vec2 Uv; varying vec4 Color0; varying vec2 TexCoord0; varying vec4 RenderDataOut; varying float ScaleOut; attribute float RandomValueIn; varying float RandomValueOut; attribute float TimeLapseIn; varying float TimeLapseOut; attribute float InnerVignettingIn; varying float InnerVignettingOut; attribute float OuterVignettingIn; varying float OuterVignettingOut; attribute float SepiaValueIn; varying float SepiaValueOut; attribute float NoiseValueIn; varying float NoiseValueOut; attribute float ScratchValueIn; varying float ScratchValueOut; attribute float BrightnessValueIn; varying float BrightnessValueOut; attribute float DisableShaderIn; varying float DisableShaderOut; uniform mat4 Transform; uniform mat4 ProjectionMatrix; uniform mat4 ViewMatrix; uniform mat4 ModelMatrix; uniform vec3 ModelScale; varying vec2 vUv; void main(void) { RenderDataOut = RenderData; ScaleOut = Scale; // Passing data to fragment shader RandomValueOut = RandomValueIn; TimeLapseOut = TimeLapseIn; InnerVignettingOut = InnerVignettingIn; OuterVignettingOut = OuterVignettingIn; SepiaValueOut = SepiaValueIn; ScratchValueOut = ScratchValueIn; NoiseValueOut = NoiseValueIn; BrightnessValueOut = BrightnessValueIn; DisableShaderOut = DisableShaderIn; Color0 = Color; TexCoord0 = TexCoord; gl_Position = Transform * vec4(Position.xyz, 1.0); vec4 worldVertex = ModelMatrix * vec4(Vertex * ModelScale, 1.0); vec4 viewVertex = ViewMatrix * worldVertex; vUv = Uv; } ]]></vertex> <fragment><![CDATA[ #ifdef GL_ES precision highp float; #endif varying lowp vec4 Color0; varying mediump vec2 TexCoord0; varying lowp vec4 RenderDataOut; varying lowp float ScaleOut; varying lowp vec2 PlayerPosOut; varying lowp float RandomValueOut; varying lowp float TimeLapseOut; varying lowp float InnerVignettingOut; varying lowp float OuterVignettingOut; varying lowp float SepiaValueOut; varying lowp float NoiseValueOut; varying lowp float ScratchValueOut; varying lowp float BrightnessValueOut; varying float DisableShaderOut; uniform vec2 ImageSize; uniform vec2 TexelSize; uniform vec4 Colour; uniform sampler2D Texture0; vec3 Overlay (vec3 src, vec3 dst) { // if (dst <= src) then: 2 * src * dst // if (dst > src) then: 1 - 2 * (1 - dst) * (1 - src) return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z))); } vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } vec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } vec3 permute(vec3 x) { return mod289(((x*34.0)+1.0)*x); } float snoise (vec2 v) { const vec4 C = vec4(0.211324865405187, // (3.0-sqrt(3.0))/6.0 0.366025403784439, // 0.5*(sqrt(3.0)-1.0) -0.577350269189626, // -1.0 + 2.0 * C.x 0.024390243902439); // 1.0 / 41.0 // First corner vec2 i = floor(v + dot(v, C.yy) ); vec2 x0 = v - i + dot(i, C.xx); // Other corners vec2 i1; i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); vec4 x12 = x0.xyxy + C.xxzz; x12.xy -= i1; // Permutations i = mod289(i); // Avoid truncation effects in permutation vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 )) + i.x + vec3(0.0, i1.x, 1.0 )); vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0); m = m*m ; m = m*m ; // Gradients: 41 points uniformly over a line, mapped onto a diamond. // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) vec3 x = 2.0 * fract(p * C.www) - 1.0; vec3 h = abs(x) - 0.5; vec3 ox = floor(x + 0.5); vec3 a0 = x - ox; // Normalise gradients implicitly by scaling m // Approximation of: m *= inversesqrt( a0*a0 + h*h ); m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); // Compute final noise value at P vec3 g; g.x = a0.x * x0.x + h.x * x0.y; g.yz = a0.yz * x12.xz + h.yz * x12.yw; return 130.0 * dot(m, g); } void main(void) { if (DisableShaderOut > 0.0) { gl_FragColor = Color0 * texture2D(Texture0, TexCoord0); } else { vec3 sepia = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0); vec2 TestCoord=TexCoord0; vec3 colour = (Color0 * texture2D(Texture0, TestCoord)).xyz; float gray = (colour.x + colour.y + colour.z) / 1.5; vec3 grayscale = vec3(gray); vec3 finalColour = Overlay(grayscale, sepia); finalColour = grayscale + SepiaValueOut * (finalColour - grayscale); if (SepiaValueOut<=0.0) { finalColour = (Color0 * texture2D(Texture0, TestCoord)).xyz; } float noise = snoise(TestCoord * vec2(1024.0 + RandomValueOut * 512.0, 1024.0 + RandomValueOut * 512.0)) * 0.5; finalColour += noise * NoiseValueOut; if ( RandomValueOut < ScratchValueOut ) { // Pick a random spot to show scratches float dist = 1.0 / ScratchValueOut; float d = distance(TestCoord, vec2(RandomValueOut * dist, RandomValueOut * dist)); if ( d < 0.4 ) { // Generate the scratch float xPeriod = 8.0; float yPeriod = 1.0; float pi = 3.141592; float phase = TimeLapseOut; float turbulence = snoise(TestCoord * 2.5); float vScratch = 0.5 + (sin(((TestCoord.x * xPeriod + TestCoord.y * yPeriod + turbulence)) * pi + phase) * 0.5); vScratch = clamp((vScratch * 10000.0) + 0.35, 0.0, 1.0); finalColour.xyz *= vScratch; } } float d = distance(vec2(0.5, 0.5), TestCoord) * 1.414213; float vignetting = clamp((OuterVignettingOut - d) / (OuterVignettingOut - InnerVignettingOut), 0.0, 1.0); finalColour.xyz *= vignetting; gl_FragColor = vec4(finalColour,1)* BrightnessValueOut * texture2D(Texture0, TestCoord); } } ]]></fragment> </shader> </shaders>