Quote:
anyway, I was wondering how easy it is to create a shader that works with Shade-C that simulates a fish-eye lense.



I think you can do that with camera.arc.
If not, you can archive this effect by applying a refraction shader to the scene, with a normalmapped sphere shape. Something like this (NOTE: you have to experiment a bit, this is not a perfect example):


some code to get you started:
Code:
BMAP* map_normal_fisheye = "normalmap_fisheye.bmp";
void v_fisheye()
{
	sc_mtl_pp_refract.skill1 = floatv(2.5); //this is the refract/bump strength
	sc_mtl_pp_refract.skill2 = floatv(0); //normalmap shifting speed. we don't want the normalmap to move, so set it to 0
	sc_mtl_pp_refract.skill3 = floatv(0); //refractmask factor. (Only) makes sense when using the depthmap as refractmask
	sc_mtl_pp_refract.skin1 = map_normal_fisheye; // assign the normalmap to the refraction shader
	
	sc_ppAdd(sc_mtl_pp_refract,camera,0); //apply refraction shader to screen
}




Just call this after sc_setup().
Or, if you don't use any other effects of shade-c and only want the fisheye effect, call this anywhere in your code.


Shade-C EVO Lite-C Shader Framework