Replaced Affine Texture mapping with Regular Texute Mapping
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
// Szenen-Pipeline: die PS1-Eigenheiten aus dem Renderer-Plan, authentisch
|
// Szenen-Pipeline: die PS1-Eigenheiten aus dem Renderer-Plan, authentisch
|
||||||
// gerechnet statt nachgestellt:
|
// gerechnet statt nachgestellt:
|
||||||
// - Pixel-Snap im Vertex-Shader → Vertex-Jitter
|
// - Pixel-Snap im Vertex-Shader → Vertex-Jitter
|
||||||
// - @interpolate(linear) → affine (nicht perspektivkorrigierte) UVs
|
|
||||||
// - RGB555-Quantisierung + 4×4-Bayer-Dither im Fragment-Shader
|
// - RGB555-Quantisierung + 4×4-Bayer-Dither im Fragment-Shader
|
||||||
// - 1-Bit-Alpha-Test (Cutouts), kein Blending
|
// - 1-Bit-Alpha-Test (Cutouts), kein Blending
|
||||||
|
//
|
||||||
|
// UVs werden perspektivkorrekt interpoliert (@interpolate(perspective)). Das
|
||||||
|
// klassische PS1-Textur-Wobbeln (affin, @interpolate(linear)) ist mit einer
|
||||||
|
// frei beweglichen Kamera und großen Faces zu störend — den Look tragen
|
||||||
|
// Pixel-Snap und Dither.
|
||||||
|
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
mvp: mat4x4f,
|
mvp: mat4x4f,
|
||||||
@@ -18,8 +22,8 @@ struct Uniforms {
|
|||||||
|
|
||||||
struct VsOut {
|
struct VsOut {
|
||||||
@builtin(position) pos: vec4f,
|
@builtin(position) pos: vec4f,
|
||||||
// linear = affin interpoliert → das Textur-Wobbeln der PS1.
|
// perspektivkorrekt interpoliert (WGSL-Default) — kein Affin-Wobbeln.
|
||||||
@location(0) @interpolate(linear) uv: vec2f,
|
@location(0) @interpolate(perspective) uv: vec2f,
|
||||||
};
|
};
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
|
|||||||
Reference in New Issue
Block a user