Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by 7th_zorro. 04/16/24 13:19
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, alibaba, rki), 425 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[SOLVED] weird screen error after using decals ( using shade-c ) #461791
08/21/16 15:13
08/21/16 15:13
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi everyone,

Not sure why but I am getting these weird screen effects after creating several decals, the screen effect moves with the sun angle (cause of shadows maybe?). I use shade-c by the way, maybe its cause of the shader I use for the decal? Here are some pics:





My code the spawn the decals:

Code:
PARTICLE* p = ent_decal(ent, _bmap, _size + random(_size_random), _rota + random(_rota_random)); 
		p.lifespan = _time;
		p.material = mtl_simpleTransparent;
		set(p, TRANSLUCENT);



And here is the shader/fx file of the decal:

Code:
//------------------------------------------------------------------------------
//----- USER INPUT -------------------------------------------------------------
//------------------------------------------------------------------------------

//assign skins
#define SKIN_ALBEDO (skin1.xyz) //diffusemap
#define SKIN_ALPHA (skin1.w) //alphamap
#define SKIN_NORMAL (skin2.xyz) //normalmap
#define SKIN_GLOSS (skin2.w) //glossmap
//...

#define NORMALMAPPING //do normalmapping?

//#define GLOSSMAP //entity has glossmap?

#define ALPHA //entity has alphamap?
////#define TRANSPARENT //entity alpha should be interpreted as transparent/translucent?

//------------------------------------------------------------------------------
// ! END OF USER INPUT !
//------------------------------------------------------------------------------

#include <scHeaderObject>

//custom code goes here

#include <scObject>


Last edited by Reconnoiter; 08/24/16 10:18.
Re: weird screen error after using decals ( using shade-c ) [Re: Reconnoiter] #461829
08/24/16 01:38
08/24/16 01:38

M
Malice
Unregistered
Malice
Unregistered
M



Is creating them as soft_sprite / soft_particles as fix? Do you need to turn on forward rendering when using the standard particle/decal set?

Re: weird screen error after using decals ( using shade-c ) [Re: ] #461838
08/24/16 10:05
08/24/16 10:05
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi Malice tnx for replying. Cause of your reply I did some more tests and it only happens when I fire at a shade-c dynamic light while just standing behind its lightrange. The shade-c lights are valid targets in c_trace's.

I quess it makes sense when I look at the light create code, just suprised they didn't mentionend this in the examples cause its so easy so overlook (this could have created some many bugs lol):

Code:
ENTITY* spotlight2 = sc_light_create(vector(-156,-82,800), 1000, vector(2000,512,0), SC_LIGHT_SPOT | SC_LIGHT_SHADOW);
	spotlight2.pan = 0;
	spotlight2.tilt = -43;
	sc_light_update(spotlight2);



As you see there is an entity created to support the light. My quess is this entity is the cause the bug so I am going to try giving it some flag or otherwise give it a .group number.

-edit, yes it works. laugh

Last edited by Reconnoiter; 08/24/16 10:18.
Re: weird screen error after using decals ( using shade-c ) [Re: Reconnoiter] #461843
08/24/16 13:10
08/24/16 13:10

M
Malice
Unregistered
Malice
Unregistered
M



Since all lights will be a issue and the flag2 is pointless, I'd add flag2 to all lights and c_trace with ignore_flag2. It's a blanket solution and your going to end up using groups for selective ignoring not blank ignoring...


Ok


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1