Glossy Reflection Shader for ShaderLab

Dx Shaders, Vray Materials, LW materias,Textures and more..
Post Reply
cthulhu
Seaman
Posts: 7
Joined: 07 Sep 2015, 08:48
Type the number ten into the box: 10

Glossy Reflection Shader for ShaderLab

Post by cthulhu » 12 Sep 2015, 08:10

UPDATE: More recent version and sample pics. Added functionality for glossy reflection and translucency.

:bananahi:

Hello, all. I've been away for a while, but still dabble in trueSpace from time to time.

Here's a glossy reflection shader for ShaderLab I'm working on. Thought I'd post a draft version of it that seems to be working good.

Be sure to set the following raytrace options when using the shader:
Reflect = 0.01
Ray Limit = 0.01
Max Depth = 2 or greater
Glossy 5.zip
(4.81 KiB) Downloaded 99 times
glossysample.png
glossy.png
Last edited by cthulhu on 28 Sep 2015, 07:48, edited 1 time in total.

User avatar
Cellulo
Lieutenant Junior Grade
Posts: 828
Joined: 27 Sep 2012, 07:48
Type the number ten into the box: 9
Location: France
Contact:

Re: Glossy Reflection Shader for ShaderLab

Post by Cellulo » 12 Sep 2015, 10:28

Thanks cthulhu can i use your shader for my Modelside Edition V2.0 ? also with your old shaders for Shaderlab and shadermagic from old trueSpace forums.

cthulhu
Seaman
Posts: 7
Joined: 07 Sep 2015, 08:48
Type the number ten into the box: 10

Re: Glossy Reflection Shader for ShaderLab

Post by cthulhu » 13 Sep 2015, 06:28

Hi Cellulo. Yes, you may use my shaders.

User avatar
Cellulo
Lieutenant Junior Grade
Posts: 828
Joined: 27 Sep 2012, 07:48
Type the number ten into the box: 9
Location: France
Contact:

Re: Glossy Reflection Shader for ShaderLab

Post by Cellulo » 13 Sep 2015, 19:13

Thanks cthulhu.

cthulhu
Seaman
Posts: 7
Joined: 07 Sep 2015, 08:48
Type the number ten into the box: 10

Re: Glossy Reflection Shader for ShaderLab

Post by cthulhu » 28 Sep 2015, 07:51

Additional sample images...
glossyglass2.png
translucent.png
glossymetal.png

User avatar
Cellulo
Lieutenant Junior Grade
Posts: 828
Joined: 27 Sep 2012, 07:48
Type the number ten into the box: 9
Location: France
Contact:

Re: Glossy Reflection Shader for ShaderLab

Post by Cellulo » 28 Sep 2015, 10:48

Thanks for the update cthulhu it's really cool effect.

User avatar
Draise
Captain
Posts: 3075
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Re: Glossy Reflection Shader for ShaderLab

Post by Draise » 28 Sep 2015, 13:42

Very nice.

cthulhu
Seaman
Posts: 7
Joined: 07 Sep 2015, 08:48
Type the number ten into the box: 10

Re: Glossy Reflection Shader for ShaderLab

Post by cthulhu » 04 Mar 2017, 19:17

UPDATE: Fixed links to images below (hopefully). Also trying to get glossy reflection and refraction working together in one shader.

Been re-working this glossy shader for better speed, but still running into bugs. Thought I'd post a comparison render (straight mirror vs. glossy/brushed look). Brushed metal render was 5 minutes on a 2GHz Intel i7 laptop with 6GB of RAM.

My original shader used an array to hold the blur offset values, but the new shader uses a loop to keep averaging samples together. The original shader used straight random numbers to blur things, but I'm trying a hybrid random+noise function. It can also self-reflect quite well. I hope to post a working, usable shader soon.

Image

Image

Post Reply