ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: kernel/gfx/shader/glsl/light.frag

Source reference: kernel/gfx/shader/glsl/light.frag

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path kernel/gfx/shader/glsl/light.frag
Lines 15
Bytes 348
SHA-256 5cdf17fa288fb3535d7f0ca07449163fe0e13156be445b2c51c915fe668ff4b7
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
8 main

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

#version 330
in vec3 vN;
in vec3 vP;
uniform vec3 lightPosition;
uniform vec3 lightColor;
uniform vec3 ambientColor;
out vec4 color;
void main() {
    vec3 N = normalize(vN);
    vec3 L = normalize(lightPosition - vP);
    float diffuse = max(dot(N, L), 0.0);
    vec3 result = ambientColor + diffuse * lightColor;
    color = vec4(result, 1.0);
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-5cdf17fa288fb353 Reviewed source: da3df29cb397 Class: generated-source-reference