procedural-3d-engine/shaders/hlsl
..
base Moved shaders to new directory 2023-05-09 21:03:02 +02:00
bloom
computecloth Moved shaders to new directory 2023-05-09 21:03:02 +02:00
computecullandlod Moved shaders to new directory 2023-05-09 21:03:02 +02:00
computeheadless
computenbody Moved shaders to new directory 2023-05-09 21:03:02 +02:00
computeparticles
computeraytracing
computeshader
conditionalrender
conservativeraster
debugmarker Moved shaders to new directory 2023-05-09 21:03:02 +02:00
deferred Moved shaders to new directory 2023-05-09 21:03:02 +02:00
deferredmultisampling
deferredshadows
descriptorindexing
descriptorsets
displacement Moved shaders to new directory 2023-05-09 21:03:02 +02:00
distancefieldfonts
dynamicuniformbuffer
gears
geometryshader
gltfloading
gltfscenerendering
hdr Moved shaders to new directory 2023-05-09 21:03:02 +02:00
imgui
indirectdraw
inlineuniformblocks Moved shaders to new directory 2023-05-09 21:03:02 +02:00
inputattachments
instancing
mesh Moved shaders to new directory 2023-05-09 21:03:02 +02:00
multisampling
multithreading
multiview
negativeviewportheight
occlusionquery
offscreen
oit Moved shaders to new directory 2023-05-09 21:03:02 +02:00
parallaxmapping
particlefire
pbrbasic
pbribl
pbrtexture Moved shaders to new directory 2023-05-09 21:03:02 +02:00
pipelines Moved shaders to new directory 2023-05-09 21:03:02 +02:00
pipelinestatistics
pushconstants
pushdescriptors
radialblur
raytracingbasic
raytracingcallable
raytracingreflections
raytracingsbtdata
raytracingshadows
renderheadless Moved shaders to new directory 2023-05-09 21:03:02 +02:00
screenshot
shadowmapping
shadowmappingcascade
shadowmappingomni Moved shaders to new directory 2023-05-09 21:03:02 +02:00
specializationconstants
sphericalenvmapping
ssao
stencilbuffer Moved shaders to new directory 2023-05-09 21:03:02 +02:00
subpasses
terraintessellation
tessellation
textoverlay
texture
texture3d
texturearray
texturecubemap Moved shaders to new directory 2023-05-09 21:03:02 +02:00
texturecubemaparray
texturemipmapgen
texturesparseresidency
triangle Moved shaders to new directory 2023-05-09 21:03:02 +02:00
variablerateshading
viewportarray
vulkanscene
compile.py
README.md

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, particlefire 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.