Jonathan-L-Davidson / DX11-Framework

0 stars 0 forks source link

Week 6 - Texture sampling #6

Open Jonathan-L-Davidson opened 3 years ago

Jonathan-L-Davidson commented 3 years ago

Starting off, when removing my old color system to be replaced with a texture, I had strange results where the specular highlighting was completely wrong, it was like my normals were given incorrectly. Which soon I realised they were being sent incorrectly due to the packing rule issue.

image

The issue was that I was giving the format of a RGB float instead of a RG Float for the UV mapping coordinates. ( DXGI_FORMAT_R32G32B32_FLOAT instead of a DXGI_FORMAT_R32G32_FLOAT )

Picture showing the fix: image

I'm currently having issues with the UV mapping for my cubes and pyramids. This isn't something I can just easily fix without having to redo the cubes. However It's clear that they do function, it's just the model doesn't support them. If I were to use an .obj loader I'm sure the UV coordinates would be more suited for these faces.

https://user-images.githubusercontent.com/57398860/141390536-e9a862e6-aab9-46e3-b244-def3ca508325.mp4

Jonathan-L-Davidson commented 3 years ago

Note: I've also loaded both textures for the normal maps and specular maps, however I haven't done anything yet with this until I fixed the UV problem with my cube and pyramids.

https://user-images.githubusercontent.com/57398860/141390895-301b1e66-34bd-4c89-b2fa-a80d2fa79218.mp4

https://user-images.githubusercontent.com/57398860/141390896-6e4c2f51-9c41-4e60-bc5c-eedbaa79f9ec.mp4