Closed Kinerius closed 1 year ago
const cube = new Entity() cube.addComponent(new Transform({ position: new Vector3(8, 0, 8), scale: new Vector3(1, 3, 1) })) const shape = new BoxShape() cube.addComponent(shape) const material = new Material() material.albedoColor = new Color4(1, 0, 0, 0.3) material.castShadows = false cube.addComponent(material) engine.addEntity(cube)
Shadows are turned off for that entity
https://github.com/decentraland/unity-renderer/blob/dev/unity-renderer/Assets/Rendering/Culling/CullingControllerUtils.cs#L60 This code doesn't know that some renderers may have their shadows disabled and will override any setting of the entity's material
On it
This is the same issue I'm starting tackling for the SDK team: https://github.com/decentraland/sdk/issues/513
This seemed to be the same issue as SDK #513, but it wasn't. Fixing SDK #513 issue we noticed that SDK7 rendereables are not being culled.
Example SDK code
Expected Behaviour
Shadows are turned off for that entity
Problem
https://github.com/decentraland/unity-renderer/blob/dev/unity-renderer/Assets/Rendering/Culling/CullingControllerUtils.cs#L60 This code doesn't know that some renderers may have their shadows disabled and will override any setting of the entity's material