Quote:
Anyone tried to create a tree with transparent leaves in shade-c? Suprisingly, the shadow for the leaves are good but either the whole tree including the leaves is transparent or everything is solid (/not transparent). (ps: I am using an alpha layer (haven't tried alpha channel yet), and deferred pipeline is set off cause I also use particles)
So as to not reinvent the wheel here, why not use 2 models tree and leaves and to materials then?

EDIT ->> the meat is in default.c shade-c version
Code:
#ifdef ALPHA
			#ifdef TRANSPARENT
				
				SKIN_ALPHA *= tex2D(stipplingMaskSampler, projCoord*vecViewPort.xy*0.5).g * fAlpha;
				#ifdef TRANSPARENTALPHACLIP
					clip(SKIN_ALPHA - fAlpha);
				#else
					clip(SKIN_ALPHA - ALPHACLIP);
				#endif
			#else
				#ifdef CUSTOM_PS_ALPHA
					clip(Custom_PS_Alpha(In, SKIN_ALPHA));
				#else
					clip(SKIN_ALPHA-(1-fAlpha));
				#endif
			#endif
		#endif



Would seem to point to the alpha map being used. I'd think no need for a TRANSLUCENT flag if being used.

Last edited by Malice; 07/26/16 16:44.