Custom Effects (Solved)

rated by 0 users
This post has 0 Replies | 1 Follower

Top 25 Contributor
Posts 112
SunBurn_Community_Licensee
SunBurn_Pro_Licensee
andorov Posted: 03-14-2010 6:12 AM

Spent more time reading the forums/documentation and figured out that using the built in engine with transparency isn't supported. The workaround I used was rendering the polygon soup -- which happened to be blood -- onto a separate render target, and then multiplying that texture by the scene texture itself as a post-process effect. This produced an acceptable result, but transparency would likely look better.

-----------------

I'm trying to render a custom soup of polygons using index/vertex buffers. The current code I'm using is as follows....

 SynapseGaming.LightingSystem.Effects.Forward.LightingEffect le;
le = new SynapseGaming.LightingSystem.Effects.Forward.LightingEffect(GraphicsDevice);

le.DiffuseMapTexture = Tex;
le.TransparencyMap = Tex;

BoundingSphere sphere = new BoundingSphere(Vector3.Zero, 100000f);

SynapseGaming.LightingSystem.Rendering.SceneObject o;
o = new SynapseGaming.LightingSystem.Rendering.SceneObject(le, sphere, Matrix.Identity,Blood.IBuffer, Blood.VBuffer, Blood.Declaration, 0, PrimitiveType.TriangleList, Blood.tris, 0, Blood.verts, 0, VertexPositionNormalTextureBump.SizeInBytes);
o.Visibility = ObjectVisibility.RenderedAndCastShadows;

sceneInterface.ObjectManager.Submit(o);

This works, but I need to be able to alpha blend this model by its alpha channel. Is this possible in sunburn?

I tried using a custom SAS effect but I couldn't get it to shadow (it was always self illuminating)

Page 1 of 1 (1 items) | RSS