Updated HLSL readme
This commit is contained in:
parent
2cb468dd84
commit
0b5281d087
1 changed files with 3 additions and 11 deletions
|
|
@ -1,18 +1,10 @@
|
||||||
## HLSL Shaders
|
## HLSL Shaders
|
||||||
|
|
||||||
This directory contains a fork of the shaders found in [data/shaders/glsl](https://github.com/SaschaWillems/Vulkan/tree/master/data/shaders/glsl), re-written in HLSL.
|
This directory contains shaders using the [HLSL shading language](https://docs.vulkan.org/guide/latest/hlsl.html). These can be compiled with [DXC](https://github.com/microsoft/DirectXShaderCompiler) using e.g. the included `compile.py` script.
|
||||||
These can be compiled with [DXC](https://github.com/microsoft/DirectXShaderCompiler) using the `compile.py` script.
|
|
||||||
|
|
||||||
### Known issues
|
### Known issues
|
||||||
|
|
||||||
- specialization constants can't be used to specify array size.
|
- Specialization constants can't be used to specify array size.
|
||||||
- `gl_PointCoord` not supported. HLSL has no equivalent. We changed the shaders to calulate the PointCoord manually in the shader. (`computenbody`, `computeparticles`, `particlesystem` examples).
|
- `gl_PointCoord` not supported. HLSL has no equivalent. We changed the shaders to calulate the PointCoord manually in the shader. (`computenbody`, `computeparticles`, `particlesystem` examples).
|
||||||
- HLSL doesn't have inverse operation (`deferred`, `hdr`, `instancing`, `skeletalanimation` & `texturecubemap` examples).
|
- HLSL doesn't have inverse operation (`deferred`, `hdr`, `instancing`, `skeletalanimation` & `texturecubemap` examples), these should be done on the CPU
|
||||||
- `modf` causes compilation to fail without errors or warnings. (`modf` not used by any examples, easily confused with fmod)
|
|
||||||
- In `specializationconstants` example, shader compilation fails with error:
|
|
||||||
```
|
|
||||||
--- Error msg: fatal error: failed to optimize SPIR-V: Id 10 is defined more than once
|
|
||||||
```
|
|
||||||
When multiple constant ids are defined and have different types. We work around this problem by making all constant ids the same type, then use `asfloat`, `asint` or `asuint` to get the original value in the shader.
|
|
||||||
- `gl_RayTmaxNV` not supported. (`nv_ray_tracing_*` examples)
|
|
||||||
- HLSL interface for sparse residency textures is different from GLSL interface. After translating from HLSL to GLSL the shaders behave slightly different. Most important parts do behave identically though.
|
- HLSL interface for sparse residency textures is different from GLSL interface. After translating from HLSL to GLSL the shaders behave slightly different. Most important parts do behave identically though.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue