LogicalError / realtime-CSG-for-unity

Realtime-CSG, CSG level editor for Unity
https://realtimecsg.com
MIT License
732 stars 76 forks source link

[URP] Geometry is generated in a way that causes NaN issues for shaders with normal maps. #375

Open naelstrof opened 1 year ago

naelstrof commented 1 year ago

Steps to reproduce:

  1. Use a URP project
  2. Enable bloom in a post process volume
  3. Apply a surface shader that has a normal map to a real-time CSG surface.

image

We've confirmed that realtime CSG was the problem by exporting the mesh to blender-- Merged close verts and cleared split normal data, then reimporting.

This even happens with the built-in shader with a normal map placed in the normal map slot.

nukeandbeans commented 1 year ago

There has been a community fix provided with #372, but the developer is still working on it.

XgarhontX commented 3 months ago

I wrote a script for my game to delete the NaN faces (they all have an area of 0) https://github.com/XgarhontX/Delete0AreaFaces. It needs to ProBuilderize the RealtimeCSG mesh first, so someone can improve it by making RealtimeCSG do it itself.