HLSL: Difference between revisions

From David's Wiki
Created page with "High Level Shading Language (HLSL) is the shading language used in DirectX. It is used in Unity and Unreal. ==Usage== Notation differences between GLSL and HLSL * <code>float..."
 
Line 2: Line 2:


==Usage==
==Usage==
Notation differences between GLSL and HLSL
Minor differences between GLSL and HLSL
* <code>float4</code> instead of <code>vec4</code>. This is funny since OpenCL also uses <code>float4</code>
* <code>float4</code> instead of <code>vec4</code>. This is odd since OpenCL also uses <code>float4</code>.
* <code>lerp</code> instead of <code>mix</code>.
* <code>lerp</code> instead of <code>mix</code>.
==Pipeline==
==Pipeline==
===Vertex Shader===
===Vertex Shader===

Revision as of 15:54, 19 April 2021

High Level Shading Language (HLSL) is the shading language used in DirectX. It is used in Unity and Unreal.

Usage

Minor differences between GLSL and HLSL

  • float4 instead of vec4. This is odd since OpenCL also uses float4.
  • lerp instead of mix.

Pipeline

Vertex Shader

Geometry Shader

Tesselation Shader

Fragment Shader