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

Source reference: kernel/gfx/shader/glsl/world.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/world.frag
Lines 17
Bytes 426
SHA-256 a606a2424396d39e66c856170859e536530c2f43426c8530597af0911545e6bb
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
10 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;
in vec2 vUV;
uniform sampler2D diffuseTexture;
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 = texture(diffuseTexture, vUV) * 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-a606a2424396d39e Reviewed source: da3df29cb397 Class: generated-source-reference