0 votes

Is it not possible to create a shader that receives light from GIProbe? If I convert a SpatialMaterial to ShaderMaterial the GI stops working.

I didn't find any mention of this in the documentation.

Edit: The same material is also the only source of indirect light (the emissive parts), so it could be that the emission is not affecting GI.

Godot version 3.2.4
in Engine by (71 points)
edited by

Could you be more specific? What does your custom shader look like? Does it also happen when you use the shader code from the SpatialMaterial Shader as your ShaderMaterial shader?

The GI works well using a SpatialMaterial (with albedo, emissive and roughness textures, nothing special). When I convert that same material into ShaderMaterial without touching the shader code, the GI no longer affects the material.

Edit: The same material is also the only source of indirect light (the emissive parts), so it could be that the emission is not affecting GI.

1 Answer

0 votes
Best answer

This is a known limitation which will be fixed in Godot 4.0. I opened a pull request to document it.

by (11,891 points)
selected by

Ok, thanks. I can work around this by using ShaderMaterial for GLES2 only (no GI anyway) and SpatialMaterial for GLES3.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.