Pro version and Glass

Hi all,

I’m about to buy the Pro Version, and I have a question about Glass. I’m hoping there’s a way to get a good Glass shader going. I’ve built my scene in the Free 2.6, and it’s looking quite good (except for the glass obviously).
Can anyone tell me if the features of Pro mean that my glass can be made to look like decent glass?

Thanks

Clamps

all you get with pro is already present in unity indie, just not enabled when you add it to the scene :).

you can either use one of the refraction type shaders or use the pro water shader as a base to create your own. The sources for the builtin shaders can be found on the website

I’m sorry, I’m not sure I understood your answer. Are you saying that there’s no Glass shader in any version? That no one has posted, anywhere, a decent glass shader that we can look at or use?

The refraction shaders provide all you need for good looking glass. (coloring, bumped refraction, specular…)

Right, that makes sense. However I can see no evidence of Refraction Shaders anywhere in Indie. Are they only available in Pro?

they only work in pro, right.

they though should show up in the shader dropdown of the material

I’m unable to find them. The closest I can see are “Transparent” shaders. Is this them?

Hi all,
I’m still unable to see any shaders with the word “Refraction” in their title, even after upgrading my license to the 30 Pro trial.
Can anyone point me in the right direction?

check out the FX ones

I think the second glass shader has refraction and naturally water has it too (but not water (simple))

Thanks, I looked there…
However I only see Flare, Projector Multiply and Water (Simple). Am I missing some resources perhaps?

Either you didn’t import the pro asset or they are disabled on non-pro to prevent non-pro users from beeing confused

That must be it. Thanks very much for the advice. I installed the downloaded files, but it seems I might not have the Pro Assets. Is there a way to ensure that I have them? Or should I download them separately?

the package is present by default with any unity installation.

You just need to import it.
Its in the package folder in your unity install directory

Thank you very much. That worked perfectly. I now have the glass shaders.

I’ve just loaded the Pro Assets and I’m having the same problem finding a refractive shader or anything useful for glass.

The two glass shaders I have now are “Stained bump distort” and “stained bump distort specular”. They don’t have a refraction option and I don’t think the bump is correct for most windows- IE non stained ones.

Cheers.

Hello,
try the car shader, there’s a glass in there

Ray

Hi Yellowlabrador,

Where’s the car shader? Is it a special download somewhere?

Cheers!

Here’s that script,

Shader "Car/Glass" {
Properties {
	_Color ("Main Color", Color) = (1,1,1,1)
	_SpecularColor ("Specular Color", Color) = (0.5,0.5,0.5,1)
	_Cube ("Reflection Cubemap", Cube) = "_Skybox" {TexGen CubeNormal}
}

Category {
	Tags {Queue=Transparent}
	ZWrite Off
	Blend SrcAlpha OneMinusSrcAlpha
	Lighting Off
	Colormask RGB

	SubShader {
		Pass {
			
CGPROGRAM
// profiles arbfp1
// fragment frag
// fragmentoption ARB_fog_exp2
// fragmentoption ARB_precision_hint_fastest 
// vertex vert
#include "UnityCG.cginc"

struct v2f {
	V2F_POS_FOG;
	float3  normal	: TEXCOORD0;
	float3	viewDir	: TEXCOORD1;
};

v2f vert (appdata_tan v)
{	
	v2f o;
	PositionFog( v.vertex, o.pos, o.fog );
	o.normal = mul( (float3x3)_Object2World, v.normal );
	o.viewDir = mul( (float3x3)_Object2World, ObjSpaceViewDir(v.vertex) );
	
	return o;
}

uniform samplerCUBE _Cube : register(s0);
uniform float4 _Color;
uniform float4 _SpecularColor;

float4 frag (v2f i)  : COLOR
{
	float3 normal = i.normal;
	i.viewDir = normalize(i.viewDir);
	half nsv = saturate(dot( normal, i.viewDir ));
	
	// calculate reflection vector in world space
	half3 r = reflect(-i.viewDir, normal);
	
	half4 reflcolor = texCUBE(_Cube, r);
	
	half fresnel = 1 - nsv*0.5;
	half3 c = lerp( _Color.rgb, reflcolor.rgb*_SpecularColor.rgb, fresnel );
	
	return half4( c, fresnel );
}
ENDCG  
			SetTexture [_Cube] {combine texture}
		}
	}
	
	SubShader {
		Pass {
			Color [_Color]
		}
	}
}

}

I have the car shader, the whole shebang but somehow can’t find what folder it is located, standard or pro. the shader came from the car tutorial UT had , I’ll try to look again for the car tutorial folder, I know I posted it here before but can’t find it. I guess I have that problem that I can’t find the things that I am looking for :smile:

Ray

Dear Ray,

You total star!

I don’t remember a car shader which is why I asked. I shall keep an eye out for it but am immediately copying this into Unity. Thanks a million!

Really decent of you!

Im an Indie user. The fact that unity doesnt support Glass effect in indie version. It is correct. I tried to do a simple scene by adding a plane and a cube then add the StainedBumpedDistorted shader. Its no use.
But if u open the Island demo, then add this shader to some object then it works!! Can u explain this?
I have no idea… Why i cant have apply shader in my project while in the island demo it works?