KhronosGroup / Vulkan-Guide

One stop shop for getting started with the Vulkan API
Creative Commons Attribution 4.0 International
1.95k stars 167 forks source link

Misleading GLSL/HLSL clamp entry #257

Closed lexaknyazev closed 8 months ago

lexaknyazev commented 8 months ago

https://github.com/KhronosGroup/Vulkan-Guide/blob/c432ecbfc7439788ff0d7b75c99a34446c2c7897/chapters/high_level_shader_language_comparison.adoc#L971

HLSL's saturate is clamp(x, 0, 1). HLSL has a clamp function that matches GLSL.