Updates for procedural scenes: geometry, materials, instancing, transparency, point lights#227
Open
fbriggs wants to merge 8 commits intotweakoz:developfrom
Open
Updates for procedural scenes: geometry, materials, instancing, transparency, point lights#227fbriggs wants to merge 8 commits intotweakoz:developfrom
fbriggs wants to merge 8 commits intotweakoz:developfrom
Conversation
fbriggs
commented
Apr 13, 2026
| }); | ||
| }) | ||
| .def( | ||
| "fromArrays", |
Author
There was a problem hiding this comment.
This might not be necessary, was an attempt to fix seams and nodes on spheres which may come from HDRI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fwdtools.i2 (bug fix) — The vertex-color technique was hardcoding metallic=1, roughness=1, and double-applying vertex color. Point lights and envmaps had no effect on procedural geometry.
forward_lighting_ntex: albedo changed fromvec3(1,1,1)→modcolor(vertex color becomes PBR albedo)ambrufmtlchanged fromvec3(1,1,1)→vec3(1, RoughnessFactor, MetallicFactor)(reads material uniforms instead of hardcoded values)* modcolormultiply — was squaring vertex color, killing envmap reflectionsvec3(1)as modcolor to_forward_lightingZsince the color is already in the albedopbr.fxv2 (new features) — Transparency support for procedural geometry. Instanced rendering with vertex colors.
sb_cullcw_alphastate block (alpha blending + no depth writes)FWD_CV_NM_RI_NI_MO_ALPHAtechnique (transparent vertex-color, non-instanced)FWD_CV_NM_RI_IN_MOtechnique (opaque vertex-color, instanced)FWD_CV_NM_RI_IN_MO_ALPHAtechnique (transparent vertex-color, instanced)pbrtools.i2 (new features) — Transparency, tint/opacity per object, instanced rendering with vertex colors.
ps_forward_test_vtxcol: output changed from(lit, 1)→(lit * ModColor.rgb, frg_clr.a * ModColor.a)— enables per-object tint and opacity via ModColorps_forward_test_vtxcol_alpha— transparent fragment shader with luminance-based alpha boost for glass-like specularps_forward_instanced_vtxcol_alpha— instanced transparent fragment shader (no luminance boost, instance alpha = final opacity)vs_forward_instanced_vc— instanced vertex shader that reads per-vertex colors AND per-instance colors, multiplies themstdtools.i2 (new feature) — Instanced rendering needs to combine per-vertex colors with per-instance colors.
lib_pbr_vtx_instanced_vc— vertex-color-aware instanced vertex transform lib blockfx_pipeline.h — Pipeline cache needs to distinguish opaque vs transparent permutations.
bool _is_alpha = falsetoFxPipelinePermutationmaterial_pbr.inl — PBRMaterial needs new technique pointers and alpha blending flag.
_tek_FWD_CV_NM_RI_IN_MO,_tek_FWD_CV_NM_RI_IN_MO_ALPHA,_tek_FWD_CV_NM_RI_NI_MO_ALPHAbool _alphaBlend = falserigid_primitive.inl — Alpha blending support and instanced rendering for procedural geometry.
#include <ork/lev2/gfx/material_pbr.inl>for PBRMaterial accessinstallInCallbackDrawable: checks_alphaBlendto setpermu._is_alpharenderInstancedEML()— instanced draw callInstancedRigidPrimitiveDrawable— full instanced rendering drawable for procedural geometrypyext_gfx_lighting.cpp — Missing properties needed to create and configure dynamic lights from Python.
LightData.intensityandLightData.shadowCasterpropertiesPointLightData.radiusandPointLightData.falloffpropertiesDynamicPointLight()constructor and.datapropertySpotLightData.createNode()methodpyext_gfx_pbr.cpp — Python needs to set alpha blending on materials.
PBRMaterial.alphaBlendpropertypyext_gfx_primitives_rigid.cpp — Direct GPU buffer upload and instanced rendering from Python.
RigidPrimitive.fromArrays()— direct GPU vertex/index buffer upload from numpy arraysRigidPrimitive.createInstancedNode()— creates instanced drawable nodepyext_gfx_scenegraph.cpp (bug fix) — Instance data bindings were hardcoded to
InstancedModelDrawable.dynamic_pointer_cast<InstancedModelDrawable>→dynamic_pointer_cast<InstancedDrawable>ininstanceData,setInstanceMatrix,setInstanceColorfx_pipeline.cpp — Pipeline cache index needs the alpha bit.
_is_alphatogenIndex():index += (uint64_t(_is_alpha) << 6)material_pbr.cpp — gpuInit needs to load new technique pointers.
FWD_CV_NM_RI_NI_MO_ALPHA,FWD_CV_NM_RI_IN_MO,FWD_CV_NM_RI_IN_MO_ALPHAfwdnode_pipeline.cpp — Forward pipeline technique selection for new permutations.
_is_alphaflag for both instanced and non-instanced vertex-color pathsTests