orels1 / orels-Unity-Shaders

A collection of practical Unity shaders for your next project
https://shaders.orels.sh
Other
178 stars 15 forks source link

[ORL-67] Albedo channel select is selecting the wrong channel #63

Open JotaPe opened 10 months ago

JotaPe commented 10 months ago

Describe the bug Because of indexing being wrong, the albedo channel dropdown is selecting the wrong channel

To Reproduce 1 - Use the Standard Orels Shader 2 - Put a texture on the Albedo 3 - Select a channel

Expected behavior Select the correct channel for albedo colors

Screenshots

image

Texture with this blue channel

image

Blue Channel selected on material, but instead is selecting the alpha channel

Environment:

Additional context Would be a easy fix, just minus 1 on the _AlbedoChannel in the shader source code, already did that on my version.

From SyncLinear.com | ORL-67

JotaPe commented 10 months ago

ORL Standard.orlshader Line 118 From: albedo.rgb = albedo[_AlbedoChannel].xxx; to: albedo.rgb = albedo[_AlbedoChannel - 1].xxx;

JotaPe commented 10 months ago

Figured it out when using your shader to make materials with "advanced channel packing" where the blue channel is the albedo.

orels1 commented 10 months ago

Oh right, because default is RGB, so i need to offset it by 1! Good catch, and thank you for the report, I'll throw this into the next release