procedural-3d-engine/shaders/hlsl
2024-03-19 18:29:43 +01:00
..
base
bloom
computecloth Code cleanup, rework, additional code comments 2024-01-07 20:04:18 +01:00
computecullandlod
computeheadless
computenbody Code cleanup, restructuring. code comments 2024-01-08 19:04:03 +01:00
computeparticles
computeraytracing Heavily reworked this sample 2024-01-12 12:45:14 +01:00
computeshader
conditionalrender
conservativeraster
debugprintf Added sample for shader debugprintf 2023-12-24 14:50:29 +01:00
debugutils Replaced the deprecated debug marker sample with debug utils 2023-12-22 12:04:50 +01:00
deferred
deferredmultisampling
deferredshadows
descriptorindexing
descriptorsets
displacement Code cleanup, simplified descriptor setup 2024-01-15 19:12:06 +01:00
distancefieldfonts Code cleanup, simplified, added code comments 2024-01-13 15:59:19 +01:00
dynamicuniformbuffer
gears Complete rework of the sample 2024-01-06 16:47:11 +01:00
geometryshader Code cleanup and simplification 2024-01-14 11:04:43 +01:00
gltfloading
gltfscenerendering
hdr Updated hlsl shaders 2024-01-20 13:06:04 +01:00
imgui
indirectdraw
inlineuniformblocks
inputattachments
instancing
mesh
meshshader Updated HLSL compile script 2023-10-13 17:02:04 +02:00
multisampling
multithreading
multiview
negativeviewportheight
occlusionquery
offscreen
oit
parallaxmapping
particlesystem Renamed particle fire sample 2023-07-16 16:03:29 +02:00
pbrbasic
pbribl
pbrtexture
pipelines
pipelinestatistics
pushconstants
pushdescriptors
radialblur
raytracingbasic Fixed HLSL shaders (mostly ray tracing related) 2023-10-13 17:26:51 +02:00
raytracingcallable Fixed HLSL shaders (mostly ray tracing related) 2023-10-13 17:26:51 +02:00
raytracingpositionfetch Added HLSL shaders 2024-03-19 18:29:43 +01:00
raytracingreflections Fixed HLSL shaders (mostly ray tracing related) 2023-10-13 17:26:51 +02:00
raytracingsbtdata Fixed HLSL shaders (mostly ray tracing related) 2023-10-13 17:26:51 +02:00
raytracingshadows Fixed HLSL shaders (mostly ray tracing related) 2023-10-13 17:26:51 +02:00
renderheadless
screenshot
shadowmapping
shadowmappingcascade
shadowmappingomni
specializationconstants
sphericalenvmapping
ssao
stencilbuffer
subpasses Use shader storage buffer to pass lights to shader 2023-12-13 18:31:49 +01:00
terraintessellation
tessellation Code cleanup, fixed HLSL shaders 2024-01-14 10:24:55 +01:00
textoverlay
texture
texture3d
texturearray Code cleanup, refactoring and simplification 2024-01-14 15:23:58 +01:00
texturecubemap Code cleanup, refactoring and simplification 2024-01-14 15:23:58 +01:00
texturecubemaparray Code cleanup, refactoring and simplification 2024-01-14 15:23:58 +01:00
texturemipmapgen
texturesparseresidency
triangle
variablerateshading Updated shading rate sample to KHR extension 2023-10-13 18:53:51 +02:00
viewportarray
vulkanscene Code cleanup 2024-01-07 17:03:39 +01:00
compile.py Fixed HLSL shaders (mostly ray tracing related) 2023-10-13 17:26:51 +02:00
README.md Renamed particle fire sample 2023-07-16 16:03:29 +02:00

HLSL Shaders

This directory contains a fork of the shaders found in data/shaders/glsl, re-written in HLSL. These can be compiled with DXC using the compile.py script.

Known issues

  • 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).
  • HLSL doesn't have inverse operation (deferred, hdr, instancing, skeletalanimation & texturecubemap examples).
  • 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.