Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //// struct ////
- struct EdWorldLightingInfo
- {
- EdWorldLightingInfo()
- {
- ambientColor = V3(0,0,0.1f);
- dirLightDir = V2(0);
- dirLightColor = V3(0);
- dirLightDvg = 10;
- dirLightNumSamples = 15;
- lightmapClearColor = V3(0);
- // radNumBounces = 2;
- lightmapDetail = 2;
- lightmapBlurSize = 1;
- aoDist = 2;
- aoMult = 1;
- aoFalloff = 2;
- aoEffect = 0;
- // aoDivergence = 0;
- aoColor = V3(0);
- aoNumSamples = 15;
- sampleDensity = 1.0f;
- }
- Vec3 ambientColor;
- Vec2 dirLightDir;
- Vec3 dirLightColor;
- float dirLightDvg;
- int32_t dirLightNumSamples;
- Vec3 lightmapClearColor;
- // int32_t radNumBounces;
- float lightmapDetail;
- float lightmapBlurSize;
- float aoDist;
- float aoMult;
- float aoFalloff;
- float aoEffect;
- // float aoDivergence;
- Vec3 aoColor;
- int32_t aoNumSamples;
- float sampleDensity;
- String skyboxTexture;
- String clutTexture;
- };
- //// metadata script ////
- function MD_VEC2( x, y )
- {
- return fmt_pack( "2f", x, y ?? x );
- }
- function MD_VEC3( x, y, z )
- {
- return fmt_pack( "3f", x, y ?? x, z ?? x );
- }
- STRUCT("EdWorldLightingInfo",
- {
- metadata = { label = "Lighting info" },
- props =
- [
- { name = "ambientColor", type = "Vec3", metadata = { label = "Ambient color", min = MD_VEC3(0,0,0), max = MD_VEC3(1,1,100) } },
- { name = "dirLightDir", type = "Vec2", metadata = { label = "Dir.light direction (dX,dY)", min = MD_VEC2(-8192), max = MD_VEC2(8192) } },
- { name = "dirLightColor", type = "Vec3", metadata = { label = "Dir.light color (HSV)", min = MD_VEC3(0,0,0), max = MD_VEC3(1,1,100) } },
- { name = "dirLightDvg", type = "float", metadata = { label = "Dir.light divergence", min = 0, max = 180 } },
- { name = "dirLightNumSamples", type = "int32_t", metadata = { label = "Dir.light sample count", min = 0, max = 256 } },
- { name = "lightmapClearColor", type = "Vec3", metadata = { label = "Lightmap clear color (HSV)", min = MD_VEC3(0,0,0), max = MD_VEC3(1,1,100) } },
- // { name = "radNumBounces", type = "int32_t", metadata = { label = "Radiosity bounce count", min = 0, max = 256 } },
- { name = "lightmapDetail", type = "float", metadata = { label = "Lightmap detail", min = 0.01, max = 16 } },
- { name = "lightmapBlurSize", type = "float", metadata = { label = "Lightmap blur size", min = 0, max = 10 } },
- { name = "aoDist", type = "float", metadata = { label = "AO distance", min = 0, max = 100 } },
- { name = "aoMult", type = "float", metadata = { label = "AO multiplier", min = 0, max = 2 } },
- { name = "aoFalloff", type = "float", metadata = { label = "AO falloff", min = 0.01, max = 100.0 } },
- { name = "aoEffect", type = "float", metadata = { label = "AO effect", min = -1, max = 1 } },
- // { name = "aoDivergence", type = "float", metadata = { label = "AO divergence", min = 0, max = 1 } },
- { name = "aoColor", type = "Vec3", metadata = { label = "AO color (HSV)", min = MD_VEC3(0,0,0), max = MD_VEC3(1,1,100) } },
- { name = "aoNumSamples", type = "int32_t", metadata = { label = "AO sample count", min = 0, max = 256 } },
- { name = "sampleDensity", type = "float", metadata = { label = "Sample density", min = 0.01, max = 100.0 } },
- { name = "skyboxTexture", type = "String", metadata = { label = "Skybox texture", edit = "texture" } },
- { name = "clutTexture", type = "String", metadata = { label = "Default post-process cLUT", edit = "texture" } },
- ],
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement