Skip to content

Instantly share code, notes, and snippets.

View LVutner's full-sized avatar
💭
zaebis

LVutner

💭
zaebis
View GitHub Profile
@LVutner
LVutner / .minimal d3d11 pt3.md
Created October 23, 2022 17:05 — forked from d7samurai/.readme.md
Minimal D3D11 pt3

Minimal D3D11 pt3

An elaboration on Minimal D3D11 pt2, adding shadowmapping and incorporating various improvements and alternative approaches to the rendering setup, such as manual vertex fetching, samplerless texture lookup, null shader depth map rendering and procedurally generated texture and instance data. As before, this is intended to be an uncluttered Direct3D 11 setup & basic rendering primer / API familiarizer, in the form of a complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion. No modern C++ / OOP / obscuring cruft. View on YouTube

minimald3d11pt3

@LVutner
LVutner / LabPBR template
Last active September 29, 2023 15:22
LabPBR unpacking template (1.3)
//Sample textures
vec4 albedo_tex = texture2D(texture, texcoord);
vec4 normal_tex = texture2D(normals, texcoord);
vec4 specular_tex = texture2D(specular, texcoord);
//Gamma correction - Optional if you're not doing gamma correct lighting
albedo_tex.xyz = pow(albedo_tex.xyz, vec3(2.2));
//Normals
vec3 normal;