PBR Shader

(Aryok) #1

Hi, I want to share this shader, it has a very limited use, but you can use it to visualize your models.

I want to thank Kupoman for the help, and also Martinsh for his realtime cubemap implementation.

You’ll need to download the reflection cubemaps and unzip it in the same folder as the blend file. I hope you enjoy it.




PBR_Viz.zip (1.38 MB)

Reflection Cubemaps:



If you feel generous and you want to buy me a beer or a pizza :slight_smile: all donations are very appreciated.


(Jackii) #2

I was hypnotised for a few days by that video since you posted it. :smiley:
Really, really amazing work! I’ll try to reproduce it using material nodes so it can interact with existing blender materials and lights.

Really looking forward for this getting hardcoded in blender’s source. (along with that new build with viewport-only PBR)

(Chucker) #3

@Jackii, it would be awesome if this was hardcoded in, is that confirmed? Many thanks for the upload Aryok :D.

(Spirou4D) #4

Mr Aryok, you don’t speak or you are idiotic. When you use a forum, you must answer to the questions, not?

or, may be, the only thing that matters is you fiddle in front of the world!

(Dugpa) #5

Which questions do you mean?

(Aryok) #6

Thank you guys! the next update will support point, spot and directional lights, also I’ll try my best with pre-integrated skin shader, the rest will be to support shadow mapping but after some research I think it will not be possible, I’ll try anyway.

(BluePrintRandom) #7

:smiley: Very nice work!

(Spirou4D) #8

Question 1: “it would be awesome if this was hardcoded in, is that confirmed?”
Question 2: Wouldn’t it be hard to compile it along with other blender materials when the game engine starts?

OK Mr Aryok, I got a little carried away but I find it odd that after these favorable comments, do not represent you or thank compliments, I think it is normal to be in touch here. And I like wake up people about the fundamentals of life.

Now you do not feel obliged to answer these remarks since everything is going well for you!

EDIT: I havn’t downloaded your PBR shader because I like better the work of Hypersomniac.

(Binary) #9

Great work Aryok, i can see different mipmaps level combination in Reflection cubemaps, How did they work in your shader? and blender can be use dds file? (if i’m right dds contains different mimap level in different layers)

(Jackii) #10

@Spirou4d, Question 1 was targeted at me (I think).
Question 2, It needs to be merged with blender materials’ GLSL from the source code, which depends on question 1.

(Aryok) #11

Thank you Binary, the problem with Blender’s .dds files is that to be able to access custom mipmaps it has to be power of two resolution, that means stretching the cubemap and also requires DXT compression which make it unusable for rougher surfaces. That’s why I decided to do sampling for each mipmap level in the pixel shader, and the way it works is by doing a mix or lerp between the nearest miplevels indicated by the roughness value.