diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-07-26 16:34:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-26 09:34:40 -0700 |
| commit | 7b48b24baac066c3c54aaad3f36fb5979fc18ed1 (patch) | |
| tree | 057572f4513e4241904e18812821d37b3b723c72 /source | |
| parent | c61775e634a6a52772de60e68ba6d50751d8b790 (diff) | |
Add glsl intrinsics for CalculateLevelOfDetail (#3023)
Translates to textureQueryLod().x (with the Unclameped variant being returned in the .y component)
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/core.meta.slang | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang index ddb81fd87..77b9405ba 100644 --- a/source/slang/core.meta.slang +++ b/source/slang/core.meta.slang @@ -1358,9 +1358,11 @@ struct TextureTypeInfo if( !isMultisample ) { + sb << "__target_intrinsic(glsl, \"textureQueryLod($p, $2).x\")"; sb << "float CalculateLevelOfDetail(" << samplerStateParam; sb << "float" << base.coordCount << " location);\n"; + sb << "__target_intrinsic(glsl, \"textureQueryLod($p, $2).y\")"; sb << "float CalculateLevelOfDetailUnclamped(" << samplerStateParam; sb << "float" << base.coordCount << " location);\n"; } |
