freezy / freezy/VisualPinball.Engine

Create VPE specific shaders

Open
#223 5 comments 0 reactions 1 assignee Claimed by @Pandelii View on GitHub
enhancement rendering unity
Dominant language
C#
Stars
508
Forks
73
Avg merge
43m
Merged PRs (30d)
3

Description

In testing the metals i found a few workflow issues with the default shader that will create a lot of texture/download size bloat for tables. A new shader could reduce this by encouraging re-use of textures.

Since tables share so many materials with only slight variations, the material and texture workflow can be simplified by introducing a VPE specific shader graph.

This shader would provide a simplified interface, hopefully easier code based access and more flexibility for custom texture usage while at the same time providing more opportunity for reuse of shared textures. Using a graph for this instead of a traditional shader also improves the odds of future compatability with render pipelines, and provides creators with something less complex than manual code editing if they need a variation that falls outside the scope of the default.

Base functionality:
Albedo map and color. To allow for greyscale albedo + tinting.
Metalness value map + remap.
Smoothness/Ambient occlusion map + remap
Wear map + remap.
Transmission Profile
Transmission map
Normal map
Texture placement: UVx, Planar, Triplanar
UV tiling + offset + rotation.
Anisotrophy

Special layered shader can be used to combine materials with simple masking.

Code entry points:
Tex2d inputs:
_Albedo
_Metalness
_SmoothAO
_Wear
_Normal

Float inputs
_MetalLow
_MetalHigh
_SmoothLow
_SmoothHigh
_AOMultiplier
_WearAmount
_NormalAmount
_RotationAmount
_Anisotrophy

Vector2 Inputs
_UVTile
_UVOffset

Vector3 inputs
_WorldScale
_WorldOffset

Vector4 inputs
_AlbedoColor

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.