Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Shaders decompilation broken #1229

Open
CREAsTIVE opened this issue Mar 1, 2024 · 6 comments
Open

[Bug]: Shaders decompilation broken #1229

CREAsTIVE opened this issue Mar 1, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@CREAsTIVE
Copy link

CREAsTIVE commented Mar 1, 2024

Are you on the latest version of AssetRipper?

Yes, I'm on the latest release of AssetRipper.

Which release are you using?

Windows x64

Which game did this occur on?

Slime Rancher

Which Unity version did this occur on?

2019.4.29f1

Is the game Mono or IL2Cpp?

Mono

Describe the issue.

So simmilar to this discussion i got same error. Cameras just wont work if PostProcess is enabled. However, in my case, in addition to the postprocessor shaders, 90% of the regular shaders also broken. Their code look approximately the same:

Shader "SR/Paintlight/Triplanar Topper" {
	Properties {
		// A lot of (diffrent and correct for each shader) shader properties
	}
	//DummyShaderTextExporter
	SubShader{
		Tags { "RenderType" = "Opaque" }
		LOD 200
		CGPROGRAM
#pragma surface surf Standard
#pragma target 3.0
		struct Input
		{
			float2 uv_MainTex;
		};

		void surf(Input IN, inout SurfaceOutputStandard o)
		{
			o.Albedo = 1;
		}
		ENDCG
	}
	Fallback "Diffuse"
	//CustomEditor "ShaderForgeMaterialInspector"
}

And of course nothing renders correctly:
image

some Post-process shaders also broken, but in a different way. So for example content of Hidden/SSAO Pro V2:

Shader "Hidden/SSAO Pro V2" {
	Properties {
		_MainTex ("", 2D) = "white" {}
		_SSAOTex ("", 2D) = "white" {}
		_NoiseTex ("", 2D) = "white" {}
	}
	//DummyShaderTextExporter
	SubShader{
		Tags { "RenderType"="Opaque" }
		LOD 200
		CGPROGRAM
#pragma surface surf Standard
#pragma target 3.0

		sampler2D _MainTex;
		struct Input
		{
			float2 uv_MainTex;
		};

		void surf(Input IN, inout SurfaceOutputStandard o)
		{
			fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
			o.Albedo = c.rgb;
			o.Alpha = c.a;
		}
		ENDCG
	}
}

its should contains atleast 7 passes (but in reality its dont, what cause post-process errors)

Relevant log output

AssetRipper.log

@CREAsTIVE CREAsTIVE added the bug Something isn't working label Mar 1, 2024
@ds5678
Copy link
Collaborator

ds5678 commented Mar 1, 2024

Shader decompilation is provided "as-is" because I do not work on that section of the project, and the individual who contributed the feature has higher priorities. They have given no indication that their priorities will change anytime soon.

@CREAsTIVE
Copy link
Author

@ds5678 Sad... But is there a way to import and use shaders without decompilation?

@ds5678
Copy link
Collaborator

ds5678 commented Mar 1, 2024

Dummy and yaml are both good options

@EXtremeExploit
Copy link

Same problem on My Little Pony: A Maretime bay Adventure, Unity version is 2020.3.26f1 it uses URP, Toony Colors 2 Pro and shader graph shaders. Exact same shader issue with mostly everything being white

@AmogusJS
Copy link

AmogusJS commented Apr 29, 2024

Same problem on My Little Pony: A Maretime bay Adventure, Unity version is 2020.3.26f1 it uses URP, Toony Colors 2 Pro and shader graph shaders. Exact same shader issue with mostly everything being white

Same problem here with the same app and the toony colors shader. It looks like the shader graph was used to apply the texture to the material which now doesn't load because the shader is replaced with a dummy file and everything defaults to grey. It still should be possible to retexture everything and I'm currently looking for a possible fix.

Did you manage to solve it already by any chance?

@EXtremeExploit
Copy link

Nope, as said above the current shader decomp is broken on this unity version at this moment, all we can do is wait or fix it ourselves but i dont have the knowledge to do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants