You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relief mapping is slow, here are some framerate recorded on my system with all of our presets and for each of them I enabled and disabled relief mapping. This is recorded for a 4K screen resolution on an AMD Radeon PRO W7600.
preset
RM off
RM on
lowest
1250 fps
780fps
low
1100 fps
650 fps
medium
600 fps
330fps
high
580 fps
280 fps
ultra
580 fps
290 fps
This single feature removes 500 fps from the framerate of lowest and low presets, and 300 fps from the framerate of medium, high and ultra presets.
Actually don't ask me why with ultra preset and relief mapping enabled I get 10 fps more than with high and same feature enabled, I tested multiple time and reproduced it. 🤔️
Anyway, the root problem addressed by this issue is the slowness of relief mapping.
The big performance loss between low and lowest presets compared to medium, high and ultra is the enablement of multitexturing with normal mapping, specular mapping, etc. which adds a lot of code and binds many more textures. We may also lose performance in some way we switch between shaders (something the material branch attempts to fix).
But, the relief mapping single handledly consumes as much as performance as all the features enabled in medium presets.
Among possible improvements we may investigate, @SomaZ said this in developper chat channel:
texture2d is usually slow in loops. using textureGrad can improve performance as it doesnt need to determine mips again and again
Here is some Khronos documentation about textureGrad:
Relief mapping is slow, here are some framerate recorded on my system with all of our presets and for each of them I enabled and disabled relief mapping. This is recorded for a 4K screen resolution on an AMD Radeon PRO W7600.
This single feature removes 500 fps from the framerate of lowest and low presets, and 300 fps from the framerate of medium, high and ultra presets.
Actually don't ask me why with ultra preset and relief mapping enabled I get 10 fps more than with high and same feature enabled, I tested multiple time and reproduced it. 🤔️
Anyway, the root problem addressed by this issue is the slowness of relief mapping.
The big performance loss between low and lowest presets compared to medium, high and ultra is the enablement of multitexturing with normal mapping, specular mapping, etc. which adds a lot of code and binds many more textures. We may also lose performance in some way we switch between shaders (something the material branch attempts to fix).
But, the relief mapping single handledly consumes as much as performance as all the features enabled in medium presets.
Among possible improvements we may investigate, @SomaZ said this in developper chat channel:
Here is some Khronos documentation about textureGrad:
The text was updated successfully, but these errors were encountered: