The reflections and shadows look nice. I was also experimenting with area lights and shadows, but this is some next level stuff. Fun stuff. I think you need to wrap your functions inside a struct to be able to reference other structs. #ifndef RAYMARCHING #define RAYMARCHING struct SDFHitResult { float hit; float3 hitpos;…
Yeah, just looking through the include files. Although if you hover over the input slots in the editor, then it'll tell you in the tooltip what texture channel it derives the information from (they aren't automatically generated - it's just written out in the custom shader inspector). UnityStandardInput.cginc has the…
I would use a simple approach. Basically all you have to do is : ( 1 - glossiness ) * numofmipmaps. In my case it's 7. My setup : If your are using phong or blinn you might want to multiply your glossiness by 128 in order to get a range of 0 - 1 to avoid value like 180 or 200. But with a cook torrance or a spherical…