Facepunch / sbox-issues

175 stars 12 forks source link

[Shadergraph] Envmap Probe / Cube map not working on metalness in material #5341

Closed SGde3a closed 4 months ago

SGde3a commented 7 months ago

Describe the bug

Using a material with high Metalness. No environment map is seen. Only black. sandbox_troubleshoot_road01

To Reproduce

  1. Standard scene with default 2D Skybox and Envmap Probe.
  2. Create Shader Graph material, any albedo/colour. Set Roughness to 0.00 or near. Metalness to 1.00.
  3. Preview of material turns black. Material in scene is black. sandbox_troubleshoot_road02

Expected behavior

More Metalness should = more Env Map reflected back.

Tried different Environment Probe settings. No difference.

Media/Files

No response

Additional context

No response

samzanemesis commented 7 months ago

Does it work if you press Game tab? Do you have your probe set to render dynamically?

SGde3a commented 7 months ago

Doesn't work in Game tab. Doesn't work setting probe to render dynamically.

This is a default installation. Default 'Sweeper' sample scene. No Hammer map has been rendered/baked.

SGde3a commented 6 months ago

Some more details... This is more about the ShaderGraph.

Environment map in scene works. Shadergraph 'preview' environment map doesn't, and shadergraph textures and reflections don't work in a material.

Tests: A new material, default 'complex' shader. Environment map works.

A new material, select a shadergraph shader (containing only a Red Albedo colour, 100% metalness, 10% roughness). Red shows in scene. No environment relections. If the shader contains textures. No textures show.

SGde3a commented 6 months ago

This works in scene now - A reflective Shader Graph in a material, applied to an object in scene. New 2D Skybox with Envmap Probe component, set to Render Dynamically. Existing Skybox was broken.

Reflections not present in preview windows for Shader Graph editor and Material editor.

SGde3a commented 4 months ago

ShaderGraph Reflections with Envmap works now in ShaderGraph, in Scene, and appears to work in Material editor (background is gray).