Skip to reading
The Scene Designer — Part 1

Set a shader default and override one surface

Edition 0.86.4.7

0.86.4.7 tutorial edition with new lessons for Studio 0.86.4.6 and 0.86.4.7. Earlier chapters, screenshots and registry figures retain their stated edition context.

Download PDFView illustrations
PCA 3D ADVENTURE STUDIO                                                                                 Scene Designer

STUDIO 0.86.4.7 • LESSON 2 OF 2

Share a shader between two targets, then give just one a stronger effect. A uniform is a named input declared by the shader, such as strength, tint or an image.

1. Import a compatible source

In Asset Designer import a .gdshader file, or a supported .glsl, .frag or .fs fragment. Use a canvas shader for a GUI element and a spatial shader for a 3D surface. Studio checks the converted source on the active renderer. Select the saved asset and inspect the uniforms the renderer reports.

2. Choose the shared starting value

For a float named strength, check its override in the asset parameters and set it to 0.5 if that fits its declared range. If your shader uses a different name, use that field. For a color use the color picker. For a texture choose a compatible image asset. Assign the shader to two compatible targets.

3. Change just one target

Open the first element, object, region, room or overlay that owns the effect. In its imported shader parameters, check strength and set it to 0.75. Leave the second target’s local checkbox clear. Inspect both in Runtime Preview. Clearing the first checkbox should restore the shared asset default.

Local strength set to 0.75. An obsolete override is retained below the current shader fields.

WHAT TO CHECK

If the two surfaces look identical, check that the shader actually uses the uniform in its output. If changing one affects both, confirm that you edited the first owner’s override rather than the shared asset.

Related original lesson | p. 18 Tutorial edition 0.86.4.7

Page 65 of 65Permalink
Go to page