The rendering interface editor is opened when double-clicking on an asset of type “rendering interface” (with the “.pkri” file extension) inside the content browser.
This is the window that allows you to edit rendering interfaces, which can then be used to compose materials / feature-sets.
A minimal UI is available for editing rendering interface files (.pkri).
When editing a custom .pkri file, there are three parts to consider:
- What rendering features should be available to the project
- What are the properties of those features (per particle data, constants, ..)
- What data PopcornFX Editor should send to the shader if that feature is enabled (only required for in-editor rendering or if your engine integration uses PK-SampleLib’s RHI implementation to render particles)
- Rendering interface name (only used for display in the material editor)
- Rendering features list
- Creation dialog
This list displays every features defined by this rendering interface file.
- Rendering feature properties, this order determines the order in which they will be displayed in the renderer’s detail panel
- Creation dialog
- PopcornFX rendering only (PK-SampleLib’s RHI implementation)
When selecting a feature from the features list, its properties are displayed.
Rendering feature property
- Description that will be displayed when hovering that property in the renderer’s detail panel
- How that property should be displayed in the UI and named when retrieved in code
- Whether it’s an image, color, .. not all property types are supported by PopcornFX Editor shaders
- Property type (Note: only Link and Property are valid types):
- If Link, this is a per particle value
- If Property, this is a per renderer value (constant)
- Property category, is it not allowed to leave this empty, to have properties/pins displayed without a parent category, use “General“
- Default value, will depend on the property’s Exported Type
- Pin visibility rules: allows to display that property under conditions
When selecting a rendering feature property, its properties are displayed.
IMPORTANT: The UI allows to modify various properties (Custom Name, Active, Exec Stage, ..) that are not used internally. You should only modify properties numbered above. The UI for editing rendering feature properties will be improved in future versions.
Note: Some rendering feature properties (ie. Diffuse.DiffuseMap) are setup as “Link” while this is a draw call constant. This is only to enable the value to be exported to parent graphs. Data types are special cases and will end up being a renderer property once the graph is compiled. Only numeric values are expected to be per particle values (Float1, float2, ..).
Rendering feature shaders infos
- Determines which vertex data should be available in the vertex and fragment shaders
- UseUV: Mesh / Billboard / .. texcoords will be passed to the vertex and fragment shaders. Texcoords can be generated (on CPU / GPU for billboards and ribbons) or directly loaded from the source mesh.
- UseNormal: Vertex normals should be passed to the vertex and fragment shaders (ie. lighting operations). Normals can be generated (on CPU / GPU for billboards and ribbons) or directly loaded from the source mesh.
- UseTangent: Vertex tangents should be passed to the vertex and fragment shaders (ie. lighting operations). Tangents can be generated (on CPU / GPU for billboards and ribbons), directly loaded from the source mesh or generated.
- UseMeshUV1: Mesh Texcoord1 set should be passed to the vertex and fragment shaders. Only available for mesh renderers.
- UseMeshVertexColor0: Mesh Color0 channel should be passed to the vertex and fragment shaders (ie. VAT materials). Only available for mesh renderers.
- UseMeshVertexColor1: Mesh Color1 channel should be passed to the vertex and fragment shaders (ie. VAT materials). Only available for mesh renderers.
- Determines which scene samplers are available in the fragment shader
- SampleDepth: Scene’s depth texture will be sampled (ie. lighting operations, depth fade features)
- SampleNormalRoughMetal: Scene’s “normal/roughness/metalness” texture will be sampled (ie. lighting operations)
- SampleDiffuse: Scene’s diffuse texture will be sampled (ie. lighting operations)
- UseSceneLightingInfo: If true, scene lighting informations (directional light, ..) will be available in the fragment shader (ie. lighting operations)
- Determines which rendering feature properties (constants) should be available in the vertex and fragment shaders. Values are string values that should be properties from this rendering feature (data properties or scalar/vector properties). Supported property types (Exported Type) are:
- dataImage (InputType must be Property or Link). If InputType is Link, this property will be visible as a renderer pin, allowing better graph customization.
- int, int2, int3, int4 (InputType must be Property)
- float, float2, float3, float4 (InputType must be Property)
- Determines which textures should be flagged linear. By default, all textures are flagged sRGB.
If in doubt, contact firstname.lastname@example.org.