Skip to content

Enhancement: 2 layer parallax for PBR shader #1728

@lenship2

Description

@lenship2

What would this enhancement be for?

Rendering

Describe your enhancement suggestion in more detail

This would effectively serve the same function as $localrefract, but with proper lighting using the PBR shader (and not restricted to models): one material is visually overlayed on top of another material, and that bottom material transforms in accordance with viewer parallaxing.

Here's an example of the shader from Half Life Alyx, where it's used to make a window with parallaxed curtains:
Image

I think an effective way to implement this would be through the second texture slots usually reserved for blend textures, where the second textures are instead used for the material to overlay on top of the parallaxing material. A new vmt parameter like $2layerparallax could be added to enable this behavior.

This could be used for a PBR lightstrip texture for example, where the first texture set is the light emitting bit itself, and the second texture set is the glass cover on top of the lightstrip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementThis is something that improves upon an already existing thing.What: GraphicsGraphics-related stuff

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions