HLSL

1 program Added 2025-10-27T13:35:44Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: High-Level Shading Language
Provenance: commit 5d5e869257 · authored 2025-10-27T14:35:44+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

7 sources · pl_id: pl/hlsl
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotWikidata · Q559519

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Designed byNVIDIA · Microsoft
Influenced byC · RenderMan Shading Language

Extensions claimed by this language

7 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.hlsllinguistprimary501.9K files
.hlslpygmentsprimary501.9K files
.cginclinguistsecondary55.5K files
.fxlinguistsecondary278.8K files
.fxhlinguistsecondary11.9K files
.hlslilinguistsecondary28.3K files
.hlslipygmentssecondary28.3K files

Related languages

OpenGL Shading Language (0.42)GLSL (0.40)HLPSL (0.40)Metal (0.40)Metal Shading Language (0.40)

LLM-contributed programs

Simple D3D12 Hello Triangle Shaders

Provenance: commit 5d5e869257 · authored 2025-10-27T14:35:44+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.hlsl · license: MIT License · added: 2025-10-27T13:35:44Z
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

struct PSInput
{
    float4 position : SV_POSITION;
    float4 color : COLOR;
};

PSInput VSMain(float4 position : POSITION, float4 color : COLOR)
{
    PSInput result;

    result.position = position;
    result.color = color;

    return result;
}

float4 PSMain(PSInput input) : SV_TARGET
{
    return input.color;
}

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
imageHF.hlsli · 470 B · ext .hlsli · seen 602× in SWH
via fallback
swh:1:cnt:5469f234ddc525a9e900dc8d43103a9a862cf584;origin=https://github.com/panoramixor/demoscene;anchor=swh:1:rev:8ae3bf9701c6910aa6ab5e4bfcfed284feb9e890;path=/qop - flytrap/dependencies/WickedEngine/include/imageHF.hlsli
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
#ifndef WI_IMAGE_HF
#define WI_IMAGE_HF
#include "globals.hlsli"
#include "ShaderInterop_Image.h"

TEXTURE2D(texture_base, float4, TEXSLOT_IMAGE_BASE);
TEXTURE2D(texture_mask, float4, TEXSLOT_IMAGE_MASK);
TEXTURE2D(texture_background, float4, TEXSLOT_IMAGE_BACKGROUND);

SAMPLERSTATE(Sampler, SSLOT_ONDEMAND0);

struct VertextoPixel
{
	float4 pos : SV_POSITION;
	float2 uv0 : TEXCOORD0;
	float2 uv1 : TEXCOORD1;
	float4 uv_screen : TEXCOORD2;
};

#endif // WI_IMAGE_HF

Contribute — propose a file extension

Tell us where to find evidence about HLSL (mapped to pl/hlsl). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/HLSL/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← hls hlvm →