wip(assembler): round L24 -- per-strate passage styles; natural Worm default; FI anchor island
Core plans inter-strate passages from each upper strate's FStratePassageConfig for every generator: Straight / Worm (the new natural default: meander, variable radius, rough walls) / Spiral / Cascading. A naturalness audit (no >8 m flat runs, >=0.20 m wall relief) fails on L23's smooth tube. FloatingIslands selects Spiral, with a deterministic unique anchor island (ordinal 2) joined to the bedrock floor by a rock root. The SW arrival no longer stamps flat shelves. Capsule audits 0 blocked / 0 unsupported / 0 grade failures, all styles. Full-view hashes deterministic W1/W8/W12, Clang = GCC (reviewer re-run). Evaluator 10, FI geometry 5. KNOWN: the FI helix renders as a spiral ribbon in open air around the pillar instead of a tunnel enclosed in rock; fix next round. Unreal edits uncompiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSFYgsdW8ejZSyiMf4qRSX
This commit is contained in:
1 parent
71d09a8c52
commit
cb9236c265
17 files changed
+922
-122
No files matched your search
@@ -294,8 +294,12 @@ uniform float uHeightCenter;
|
||||
uniform float uHeightRange;
|
||||
uniform float uTileEdgeWidth;
|
||||
uniform vec3 uLightDirection;
|
||||
uniform int uHeadlamp;
|
||||
uniform int uClipEnabled;
|
||||
uniform vec4 uClipPlane;
|
||||
void main()
|
||||
{
|
||||
if(uClipEnabled!=0&&dot(vec4(vWorldPosition,1.0),uClipPlane)<0.0)discard;
|
||||
vec3 n=normalize(vNormal);
|
||||
vec3 color;
|
||||
if(uReadableMode==0)
|
||||
@@ -310,7 +314,7 @@ void main()
|
||||
float heightT=clamp(0.5+(vHeight-uHeightCenter)/max(uHeightRange,0.001),0.0,1.0);
|
||||
vec3 heightTint=mix(vec3(0.80,0.91,1.0),vec3(1.0,0.91,0.77),heightT);
|
||||
float diffuse=max(dot(n,normalize(uLightDirection)),0.0);
|
||||
float illumination=0.62+0.38*diffuse;
|
||||
float illumination=uHeadlamp!=0?0.78+0.34*diffuse:0.62+0.38*diffuse;
|
||||
color=vec3(0.64,0.62,0.56)*heightTint*illumination;
|
||||
}
|
||||
if(uTileEdges!=0&&vTileData.z>0.0)
|
||||
@@ -372,8 +376,9 @@ void main()
|
||||
}
|
||||
|
||||
bool Render(FScene& Scene,const std::filesystem::path& Output,int Width,int Height,
|
||||
double HorizontalFovDegrees,bool ReadableMode,bool TileEdges,
|
||||
double TileEdgeWidthMeters)
|
||||
double HorizontalFovDegrees,bool ReadableMode,bool Headlamp,bool TileEdges,
|
||||
double TileEdgeWidthMeters,bool ClipPlaneEnabled,
|
||||
const std::array<double,4>& ClipPlane)
|
||||
{
|
||||
EGLDisplay Display=MakeDisplay();
|
||||
EGLint Major=0,Minor=0;
|
||||
@@ -472,7 +477,15 @@ void main()
|
||||
glUniform1f(glGetUniformLocation(Program,"uHeightRange"),64.0f);
|
||||
glUniform1f(glGetUniformLocation(Program,"uTileEdgeWidth"),
|
||||
static_cast<float>(TileEdgeWidthMeters));
|
||||
glUniform3f(glGetUniformLocation(Program,"uLightDirection"),-0.42f,-0.58f,0.70f);
|
||||
glUniform1i(glGetUniformLocation(Program,"uClipEnabled"),ClipPlaneEnabled?1:0);
|
||||
glUniform1i(glGetUniformLocation(Program,"uHeadlamp"),Headlamp?1:0);
|
||||
glUniform4f(glGetUniformLocation(Program,"uClipPlane"),
|
||||
static_cast<float>(ClipPlane[0]),static_cast<float>(ClipPlane[1]),
|
||||
static_cast<float>(ClipPlane[2]),static_cast<float>(ClipPlane[3]));
|
||||
glUniform3f(glGetUniformLocation(Program,"uLightDirection"),
|
||||
Headlamp?static_cast<float>(-Forward[0]):-0.42f,
|
||||
Headlamp?static_cast<float>(-Forward[1]):-0.58f,
|
||||
Headlamp?static_cast<float>(-Forward[2]):0.70f);
|
||||
glDrawElements(GL_TRIANGLES,static_cast<GLsizei>(Scene.Indices.size()),GL_UNSIGNED_INT,nullptr);
|
||||
glFinish();
|
||||
std::vector<std::uint8_t> Pixels(static_cast<std::size_t>(Width)*Height*4);
|
||||
@@ -508,13 +521,14 @@ int main(int argc,char** argv)
|
||||
{
|
||||
if(argc<3)
|
||||
{
|
||||
std::fprintf(stderr,"Usage: %s scene.vfmesh output.png [--size=WIDTHxHEIGHT] [--fov-deg=90] [--camera-m=X,Y,Z] [--yaw-deg=N] [--pitch-deg=N] [--shade=readable|normal] [--tile-edges=on|off] [--tile-edge-width-m=N]\n",argv[0]);
|
||||
std::fprintf(stderr,"Usage: %s scene.vfmesh output.png [--size=WIDTHxHEIGHT] [--fov-deg=90] [--camera-m=X,Y,Z] [--yaw-deg=N] [--pitch-deg=N] [--shade=readable|normal] [--headlamp=on|off] [--tile-edges=on|off] [--tile-edge-width-m=N] [--clip-plane=NX,NY,NZ,D]\n",argv[0]);
|
||||
return 2;
|
||||
}
|
||||
int Width=2560,Height=1440;double Fov=90.0;
|
||||
bool HasYaw=false,HasPitch=false;double Yaw=0.0,Pitch=0.0;
|
||||
bool HasCamera=false;std::array<double,3> Camera{};
|
||||
bool ReadableMode=true,TileEdges=false;double TileEdgeWidthMeters=0.15;
|
||||
bool ReadableMode=true,TileEdges=false,Headlamp=false;double TileEdgeWidthMeters=0.15;
|
||||
bool ClipPlaneEnabled=false;std::array<double,4> ClipPlane{};
|
||||
for(int I=3;I<argc;++I)
|
||||
{
|
||||
const std::string_view Arg(argv[I]);
|
||||
@@ -555,6 +569,13 @@ int main(int argc,char** argv)
|
||||
else if(Mode=="normal")ReadableMode=false;
|
||||
else {std::fprintf(stderr,"Invalid shading mode\n");return 2;}
|
||||
}
|
||||
else if(Arg.starts_with("--headlamp="))
|
||||
{
|
||||
const std::string_view Mode=Arg.substr(11);
|
||||
if(Mode=="on")Headlamp=true;
|
||||
else if(Mode=="off")Headlamp=false;
|
||||
else {std::fprintf(stderr,"Invalid headlamp mode\n");return 2;}
|
||||
}
|
||||
else if(Arg.starts_with("--tile-edges="))
|
||||
{
|
||||
const std::string_view Mode=Arg.substr(13);
|
||||
@@ -570,6 +591,17 @@ int main(int argc,char** argv)
|
||||
||TileEdgeWidthMeters<=0.0||TileEdgeWidthMeters>5.0)
|
||||
{std::fprintf(stderr,"Invalid tile-edge width\n");return 2;}
|
||||
}
|
||||
else if(Arg.starts_with("--clip-plane="))
|
||||
{
|
||||
const std::string Value(Arg.substr(13));
|
||||
if(std::sscanf(Value.c_str(),"%lf,%lf,%lf,%lf",&ClipPlane[0],&ClipPlane[1],
|
||||
&ClipPlane[2],&ClipPlane[3])!=4
|
||||
||!std::isfinite(ClipPlane[0])||!std::isfinite(ClipPlane[1])
|
||||
||!std::isfinite(ClipPlane[2])||!std::isfinite(ClipPlane[3])
|
||||
||std::hypot(ClipPlane[0],ClipPlane[1],ClipPlane[2])<=0.0)
|
||||
{std::fprintf(stderr,"Invalid clip plane; use NX,NY,NZ,D with a non-zero normal\n");return 2;}
|
||||
ClipPlaneEnabled=true;
|
||||
}
|
||||
else {std::fprintf(stderr,"Unknown option: %.*s\n",static_cast<int>(Arg.size()),Arg.data());return 2;}
|
||||
}
|
||||
FScene Scene;std::string Error;
|
||||
@@ -583,7 +615,7 @@ int main(int argc,char** argv)
|
||||
Scene.YawDegrees,Scene.PitchDegrees,Scene.MinimumHeight,Scene.MaximumHeight,
|
||||
ReadableMode?"readable":"normal",TileEdges?"on":"off",Scene.Vertices.size(),
|
||||
static_cast<unsigned long long>(Scene.Triangles));
|
||||
return Render(Scene,argv[2],Width,Height,Fov,ReadableMode,TileEdges,
|
||||
TileEdgeWidthMeters)?0:3;
|
||||
return Render(Scene,argv[2],Width,Height,Fov,ReadableMode,Headlamp,TileEdges,
|
||||
TileEdgeWidthMeters,ClipPlaneEnabled,ClipPlane)?0:3;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user