MartyMcTime & PolyMaster
Hey Poly, I'm working on a prototype for a time‑travel rig that has to stay super low‑poly to keep the budget tight—any tips on squeezing out maximum performance with a lean mesh?
Keep it all in triangles, no quads that get split later. Strip every bevel that doesn’t change silhouette. Use normal maps for detail, vertex colors for subtle shading. Pack UVs tightly, no wasted space. If you need extra faces, create an LOD and swap it in at distance. And remember, a cube cow can be a good sanity check—if it still looks like a cow with only 128 verts, you’re on the right track.
That’s solid, but I’m thinking of slashing the cube cow into a hyper‑shifter: use a single shader that morphs the geometry when the user hits the “blink” button. Keep the verts low, but let the normals dance in time, like a quantum quiver. It’ll stay low‑poly but feel like a time warp. You think that could fit in the budget?
Sure, a vertex‑shader morph will keep the vertex count flat. Just make the shader switch the normal vectors and maybe the vertex positions in a single pass. Keep the LOD switch simple, no extra meshes. Just don’t forget to pack the morph data into a small uniform or a texture if it gets heavy. That’ll stay in the budget.
Nice! Love the idea of a one‑pass morph—less data, more chaos. Just keep the uniform snappy, or stash the matrix in a tiny texture slot, and boom you’ve got a “blink” that won’t choke the GPU. Let’s prototype it and see if the cow still moo‑s in a heartbeat. Any spare code samples?
here’s a barebones vertex shader that swaps the normals and does a tiny scale shift when the blink uniform is true; keep the fragment shader minimal and reuse the same program for both states.
```glsl
// vertex
#version 450
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aNormal;
layout(push_constant) uniform Push {
float blink; // 0.0 normal, 1.0 blink
} pc;
layout(location = 0) out vec3 vNormal;
layout(location = 1) out vec3 vPos;
uniform mat4 uModel;
uniform mat4 uViewProj;
void main() {
vec3 pos = aPos;
vec3 norm = aNormal;
if (pc.blink > 0.5) {
// small morph: flip y and scale up
pos.y = -pos.y;
pos *= 1.05;
// rotate normals to match
norm.y = -norm.y;
}
vPos = pos;
vNormal = norm;
gl_Position = uViewProj * uModel * vec4(pos, 1.0);
}
```
```glsl
// fragment
#version 450
layout(location = 0) in vec3 vNormal;
layout(location = 1) in vec3 vPos;
layout(location = 0) out vec4 outColor;
void main() {
vec3 lightDir = normalize(vec3(0.5,1.0,0.3));
float diff = max(dot(normalize(vNormal), lightDir), 0.0);
vec3 base = mix(vec3(0.3,0.7,0.9), vec3(0.9,0.3,0.7), vPos.y*0.5+0.5);
outColor = vec4(base * diff, 1.0);
}
```
Pack the `blink` value into a uniform buffer, keep the texture slot small, and you’re good to go. The cow will still moo, just faster.
That looks slick—no extra meshes, just a flip and a tiny scale bump. If the cow still moo‑s at 60fps, you’ve cracked the time‑warp budget. Let's run it on the test rig and see if the normals stay sane when we hit blink. Need any help tweaking the lighting?
Nice, keep the light simple—maybe just a directional and ambient mix. If you hit that blink, change the ambient a bit to hint the time shift. No extra passes, just tweak the lightDir in the shader with a small sin wave tied to the blink timer. That’ll keep the normals sane and the frame rate happy. Happy morphing.