Skip to main content
GameDev.net gamedev.net
🔒 Locked

TextureCube sampling

Started by matt77hias Sep 17, 2017 at 9:20 AM 2 replies 2.7k views
Original Post
matt77hias
matt77hias

Should the direction used for sampling a TextureCube in HLSL be normalized?

🧙
Hodgman
Hodgman

A long time ago, it used to be cheaper to sample from a cubemap than to normalize a vector... so there was a potential optimization where you create a cube-map that contains normalized normals, and then to normalize a vector, you use it to fetch a value out of this cube map! :o
These days this would be a terrible idea... But yeah, cube-map lookups have always taken any vector and have normalized them internally as part of the lookup process.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.