procedural-3d-engine/data/shaders/hlsl
Sascha Willems e370e6d169
Merge glTF scene rendering sample (#744)
* Started reworking the scene rendering to sample
Use glTF instead of ASSIMP, per-material pipelines, material loading, etc.

* Visibility toggle for scene nodes

* Fixed lighting, updated GLSL and HLSL shaders

* Renamed sample

* Code-Cleanup, comments, validation fixes

* Android build

* Started on tutorial for glTF scene rendering sample

* Minor code cleanup

* Adding new chapters to the tutorial for glTF scene rendering sample

* Added info on normal map shader bindings, spelling

* Added drawing chapter

* Getter for texture descriptors

Makes code a easier to read

* Renamed glTF scene sample

* Add markdown files to projects

* Updated readme, separate chapter for glTF samples

* Comments

* Removed unused screenshot
2020-07-04 14:20:45 +02:00
..
base Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
bloom Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computecloth Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computecullandlod Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computeheadless Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computenbody Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computeparticles Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computeraytracing Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
computeshader Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
conditionalrender Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
conservativeraster Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
debugmarker Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
deferred Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
deferredmultisampling Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
deferredshadows Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
descriptorsets Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
displacement Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
distancefieldfonts Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
dynamicuniformbuffer Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
gears Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
geometryshader Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
gltfloading Merge glTF scene rendering sample (#744) 2020-07-04 14:20:45 +02:00
gltfscenerendering Merge glTF scene rendering sample (#744) 2020-07-04 14:20:45 +02:00
hdr Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
imgui Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
indirectdraw Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
inlineuniformblocks Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
inputattachments Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
instancing Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
mesh Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
multisampling Rename multisampling shaders: scene -> mesh 2020-06-01 12:22:28 +01:00
multithreading Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
multiview Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
negativeviewportheight Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
nv_ray_tracing_basic Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
nv_ray_tracing_reflections Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
nv_ray_tracing_shadows Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
occlusionquery Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
offscreen Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
parallaxmapping Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
particlefire Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pbrbasic Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pbribl Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pbrtexture Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pipelines Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pipelinestatistics Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pushconstants Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
pushdescriptors Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
radialblur Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
renderheadless Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
screenshot Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
shadowmapomni Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
shadowmapping Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
shadowmappingcascade Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
specializationconstants Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
sphericalenvmapping Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
ssao Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
stencilbuffer Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
subpasses Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
terraintessellation Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
tessellation Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
textoverlay Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
texture Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
texture3d Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
texturearray Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
texturecubemap Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
texturemipmapgen Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
texturesparseresidency Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
triangle Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
viewportarray Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
vulkanscene Add pre-built HLSL shaders 2020-06-01 12:22:28 +01:00
compile.py Have dxc generate hlsl shaders into hlsl directory 2020-06-01 12:22:28 +01:00
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.