About Me

Hi. I'm Josh Ols, aka n00body. Just a wannabe game developer trying to take it seriously.

Contact:
G-mail: crunchy.bytes.blog

View Joshua Ols's profile on LinkedIn

Meta
Friday
Jul042014

On Unity 5.0's new deferred renderer

Among the many things coming in Unity 5.0, I am most excited about the new fat g-buffer deferred renderer. However, some things will need to fall into place for me to take full advantage of its power:

  1. It must allow me to override the lighting shaders, like I can now.
  2. It must let me, at a minimum, store a single low precision custom channel in the g-buffer so I can pass specular occlusion to the lighting shaders.

If I can't pass specular occlusion, then I won't be able to support proper per-light fresnel. Granted, even if I don't have that it will still be an improvement over our current situation because I can finally have properly colored specular highlights. Still, I hope that Unity, or more specifically Aras, is listening to this plea and can work something out. ;)

Friday
Jun202014

On Unity and Shader combinations

UPDATE

My discussion on the topic on the Unity forums. Found a few useful tidbits out from Aras, and thought I should share:

64 Keyword Limit questions

 

ORIGINAL

So yeah, I discovered today that Unity has a 64 unique keyword limit for all shaders in a given project. What this means is that Unity's ever so useful "#pragma multi_compile" directive is no longer a viable option for managing thousands of shader combinations because I will always hit this limit more often than I'd like. So I am forced to manually generate shader combinations that get selected from the shader menu rather than using dropdowns and checkboxes from the material UI. >_<

As a result of this, I am investigating a way to generate all these shader combinations via script. Ideally, I can make a bunch of reusable fragments, then generate all the combinations I need with the push of a button. Updating them will be a synch, as I will only need to update the fragment and the wizard will overwrite all the shaders (no more clumsy Replace in Files). Though it has a high initial cost, as I need to figure out what all this script will need to do. 

Monday
Jun162014

Unity Shader Gotcha #9 - Reserved Samplers

UPDATE

So the culprit is in the auto-generated "PrePassFinal" pass for all surface shaders. Here we have a Light Accumulation Buffer plus two lightmaps (either Dual or Directional). Apparently it can go as high as four textures on the Xbox 360 in HDR mode. :(

 

ORIGINAL

Background

Unity reserves 3 samplers for its own use in its surface shaders system. These transparently allow all surface shaders to support things like lightmaps, light cookies, shadowmaps, etc. This leaves exactly 13 samplers for the shader author to use for whatever they want in their custom surface shaders.

 

Problems

 For the vast majority of people, this is a non-issue. After all, when would a shader ever need 13 samplers? You'd have to be doing some really complex effects-heavy shaders with custom IBL...like the ones we are including in Alloy.

Once you have something like "Illumin/Detail Bumped MaskedIncan Rim Dissolve", you hit that limit pretty quickly.  Then you end up in the situation I'm in where you have to decide where you can squeeze out or just plain drop a texture in order to free that sampler up for use elsewhere. So it's better not to waste samplers by planning out EXACTLY how many you will need beforehand.

Saturday
May312014

Update 05-31-2014

Just a quick little update to say what is going on with RUST and Alloy:

  1. Unity 4.5 is amazing, and you should start using it ASAP. The faster shader compilation is insane, and has saved a ridiculous amount of development time already.
  2. Our team finally got a code management server, so that will speed up development since we can more easily coordinate our efforts.
  3. Working on a new ubershader approach for Alloy that reduces the amount of shader switching, and enables cool new shader combinations. 
  4. We're working on integrating Alloy with Skyshop's new Sky tweening system. Both fortunately and unfortunately this requires changing the way we enable Box Projection mode since Marmoset wants us to use their new UI. 

 

Other than that, some worthwhile causes to look into:

  • https://www.kickstarter.com/projects/readingrainbow/bring-reading-rainbow-back-for-every-child-everywh
  • http://www.gofundme.com/8fbxk8
Wednesday
Feb262014

Alloy Skin Shader Prototype

Since I haven't posted much in a while, here is something cool I have been working on for Alloy. This is a prototype skin shader that employs all of the following:

  • Pre-Integrated SSS
  • Saturated AO
  • Two lobe specular
  • Alloy's standard BRDF + IBL

 

Check it out!

SSS Head test

Head Scan from Lee Perry-Smith and Infinite Realities