Material Database

View Source

<?xml version="1.0"?>
<scenedata>
	<material>
		<name>rough_concrete</name>
		<phong>
			<shared_shader_info>
				<param>
					<real>
						<name>Scale</name>
						<description />
						<min>0</min>
						<max>100</max>
						<value>45</value>
					</real>
				</param>
				<shader><![CDATA[
#					def ArtisanTex() vec2: tex() * paramScale() * fbm(tex() * 7.0, 8)
					def ArtisanTex(vec3 pos) vec3: pos * paramScale() * fbm(pos * paramScale() * recip(pi()), 8)
				]]></shader>
			</shared_shader_info>
			<diffuse_albedo>
				<shader>
					<param>
						<real>
							<name>Tone</name>
							<description />
							<min>0</min>
							<max>1</max>
							<value>0.18</value>
						</real>
					</param>
					<shader><![CDATA[def eval(vec3 pos) vec3 :
let
	a = pos * 8.0 #  * 0.025
	b = sin(
			pow(
				texj(),
				0.75
			) * pi()
		) * paramTone()

#	c = min(fbm01(a, 8), b) + (1.0 - paramDefault())
	c = fbm01(a, 8) + (1.0 - paramTone())

in	vec3(c*paramTone() * noise01(ArtisanTex(pos) * 1000.))]]></shader>
				</shader>
			</diffuse_albedo>
			<exponent>
				<shader>
					<shader><![CDATA[def eval(vec3 pos) real :
	6.0 + (if(voronoiDist(pos * 3000.0, 0.5)<0.1) 1000. else 0.0)]]></shader>
				</shader>
			</exponent>
			<bump>
				<shader>
					<shader><![CDATA[def eval() real :
let
	a = fbm(ArtisanTex(posOS()), 8) * fbm(posOS() * paramScale(), 8)#0.06125
	b = fbm(a, 8)
#	b = abs(fbm(a, 8))

in	(1.0 - tan(a/b)) * 0.003 / paramScale()
	#0.0, 0.0, 1.0]]></shader>
				</shader>
			</bump>
			<fresnel_scale>
				<constant>1</constant>
			</fresnel_scale>
			<layer>0</layer>
			<ior>1.5</ior>
			<nk_data />
		</phong>
	</material>
</scenedata>

-->