How to add normals for buildings?
#1288
Open
opened 3 years ago by jiangqi9090
·
3 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I'm working on dynamic lighting but only player and vehicle models have normals in vertex input.
That way you'll make directional lightning work on buildings/roads/etc. on standard renderer. However, I'm not yet figured out how to make it work with new renderer yet, possibly somebody else might have idea.
Is there a automatic way to convert the models?
And do you know how to read depth buffer in pixel shader? I want to add ssao and some other post effects.
Thanks.
Models without normals in GTA games have wrong index order most of the times, and if you auto-generate normals for them in traditional way it'll result in flipped normals. As for reading from depth buffer you'll need to copy it from camera zBuffer somehow, or use your own rendertarget as depth buffer.