HLSL is an actively used programming language created in 2002. The High-Level Shader Language or High-Level Shading Language (HLSL) is a proprietary shading language developed by Microsoft for the Direct3D 9 API to augment the shader assembly language, and went on to become the required shading language for the unified shader model of Direct3D 10 and higher. HLSL is analogous to the GLSL shading language used with the OpenGL standard. It is very similar to the Nvidia Cg shading language, as it was developed alongside it. Read more on Wikipedia...

17Years Old 20Users 0Jobs
  • HLSL ranks in the top 20% of languages
  • the HLSL wikipedia page
  • HLSL first appeared in 2002
  • file extensions for HLSL include hlsl, cginc, fx, fxh and hlsli
  • See also: opengl, cg
  • I have 42 facts about HLSL. what would you like to know? email me and let me know how I can help.

Example code from Linguist:

float alpha = 1.f;

texture tex;
sampler tex_sampler = sampler_state
{
	Texture = (tex);
	MipFilter = LINEAR;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	
	AddressU = WRAP;
	AddressV = WRAP;
};

struct VS_OUTPUT
{
	float4 pos  : POSITION;
	float2 tex  : TEXCOORD1;
};

VS_OUTPUT vertex(float4 ipos : POSITION, float2 tex  : TEXCOORD0)
{
	VS_OUTPUT Out;
	Out.pos = ipos;
	Out.tex = tex * 2;
	return Out;
}

float4 pixel(VS_OUTPUT In) : COLOR
{
	return tex2D(tex_sampler, In.tex) * alpha;
}

technique blur_ps_vs_2_0
{
	pass P0
	{
		VertexShader = compile vs_2_0 vertex();
		PixelShader  = compile ps_2_0 pixel();
	}
}

Trending Repos

repo stars description

Last updated October 14th, 2019