Closed Petethegoat closed 6 years ago
Also it'd be useful to know what camera settings you're using! Just an inspector screenshot or something would be great.
depth appears to have very little impact on my machine, and is also reversed. I'll need to do some scaling to get it in a range that makes any noticeable difference
i've been testing the depth impact by swapping col out at the last line with float4(dscale,dscale,dscale,1.0) or float4(depth,depth,depth,1.0) btw.
yeah, I was doing that too- I see you're using deferred rendering, and I suspect that might be the key difference between our setups, as I think my project is still in forward.
edit: it's not :(
Ah, I'll change that back and see if it changes things. There wasn't any thought behind using deferred, I was probably just experimenting at some point.
Here's DOOM2.WAD MAP01 with depth only (return float4(depth,0,0,1); )
I can't detect any difference between rendering paths on my machine, but adjusting the near clip plane makes a big difference, and I had it at the default 0.3- I didn't notice as I was adjusting the far clip plane most of the time, which has negligible impact.
yeah so the scale is actually pretty small, i'm using a scale of 1 doom unit as 1/64 in unity. (A doom unit is a pixel on a texture), which means the near plane is important when you're pressed against corners. far plane is very insignificant.
(this is how it looks for me)
I'm gonna take some reference shots to compare against
Sounds good. I'll follow your camera settings from now on, so let me know if you change anything. Wonder if it's worth loading the key camera settings from json or something, so it's easier to version control.
I'm gonna just throw the player controller in the github at some point, just need to clear out the stuff i don't need
^ probably something like what we should be seeing (taken from gzdoom's opengl renderer, using a flat light level and all-white textures)
^ after clamping to the (16!) indexes doom actually uses for light levels. (I'm using the full 32 and i think thats incorrect) (i think thats clamped to 16? not 100% certain) (taken from gzdoom's software renderer, using a flat light level and all-white textures)
Main changes are moving everything back to the opaque geo queue/render type, removing the blending too.
The sky is mostly unchanged, but is now flipped correctly.
texture.shader now works for me again and looks very roughly equivalent to chocolate doom, and I haven't noticed the weird problem from before. Let me know if you have any issues and I'll get back to working on the sky shader.