Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 44 of 61 1 2 42 43 44 45 46 60 61
Re: Shade-C v0.91 BETA S1 RELEASED [Re: lostzac] #407727
09/18/12 15:19
09/18/12 15:19
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
One more thing for your ToDo List tongue

After publishing i get an error:
"error:88760b59"
What does that mean?


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Shade-C v0.91 BETA S1 RELEASED [Re: alibaba] #407746
09/18/12 20:22
09/18/12 20:22
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
I´m getting more and more into this Slender thing grin


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Shade-C v0.91 BETA S1 RELEASED [Re: alibaba] #407795
09/19/12 13:38
09/19/12 13:38
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Btw, Slender is being redone, more professionally by the guy and a team now. Just FYI

Re: Shade-C v0.91 BETA S1 RELEASED [Re: Rei_Ayanami] #407806
09/19/12 15:17
09/19/12 15:17
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
New Update:
https://github.com/BoHHavoc/ShadeC-EVO
Quote:

- Moved all code of the Objectshader to default.fx
- Added Hooks to Objectshader to easily create/change/add functions, thus being able to create new shaders which derive from the base Objectshader
- Fixed "_destroy" crashes
- Fixed Gamma Correction
- Fixed SSAO Resolution Change
- Added Example 05


Quote:
After publishing i get an error:
"error:88760b59"
What does that mean?

This might be the default.fx or d3dcompiler_42.dll missing...try the new Update, i changed some things so this shouldn't happen again. Please let me know if it works.

Quote:

Quote:
sys_free is evil


Why? Please explain.

Because it does exactly what it should do, which was bad in my case wink creating and sys_freeing something every frame is slow (at least it is for me). ptr_remove seems like a better way of doing it, as in that case the memory is only marked as free, but not really free, so other objects can now write into that memory areas and just overwrite the old data (at least i think that's the way it works). If anyone has more info on this, please go ahead and let us know laugh
While further searching for info about this, i stumbled upon the safe_remove macro which i will use in the future. I always forget to manually set object = NULL after using ptr_remove. safe_remove does that job.








[edit] Here's some examples of what you can do when deriving from Shade-C's objectshader. Note how both objects cast correct shadows, although their shape is modified by a shader. Both examples are also included in the latest update.


Dissolve effect
Code:
//------------------------------------------------------------------------------
//----- USER INPUT -------------------------------------------------------------
//------------------------------------------------------------------------------

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

#define NORMALMAPPING //do normalmapping?

#define GLOSSMAP //entity has glossmap?

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

#include <scHeaderObject>


#define CUSTOM_PS_EXTEND
#ifndef VECSKILL1
	#define VECSKILL1
	float4 vecSkill1;
#endif
psOut Custom_PS_Extend(vsOut InPs, psOut OutPs)
{
	//fetch output color and calculate clip value from it
	half clipValue = (dot(OutPs.AlbedoAndEmissiveMask.xyz,1)*vecSkill1.x)-1;
	//apply clipping
	clip(clipValue);
	
	//output clipvalue to emissive buffer for some nice glow one edges where clipping will occur in the near future
	OutPs.AlbedoAndEmissiveMask.w = (1-saturate(clipValue))*0.05;
	//set emissive color
	OutPs.AlbedoAndEmissiveMask.xyz = lerp(OutPs.AlbedoAndEmissiveMask.xyz, vecSkill1.yzw, pow(1-saturate(clipValue),2));
	
	return OutPs;
}

#include <scObject>







wobbly bloomy thingy (vertices are moved around and object is put into the emissive buffer)
Code:
//------------------------------------------------------------------------------
//----- USER INPUT -------------------------------------------------------------
//------------------------------------------------------------------------------

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

#define NORMALMAPPING //do normalmapping?

#define GLOSSMAP //entity has glossmap?
#define GLOSSSTRENGTH 0 //glossmap channel will be set to this value if GLOSSMAP is not defined

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

#include <scHeaderObject>


#define CUSTOM_VS_POSITION
#ifndef MATWORLD
#define MATWORLD
	float4x4 matWorld;
#endif
#ifndef MATWORLDVIEWPROJ
#define MATWORLDVIEWPROJ
	float4x4 matWorldViewProj;
#endif
#ifndef VECTIME
#define VECTIME
	float4 vecTime;
#endif
#ifndef VECSKILL1
#define VECSKILL1
	float4 vecSkill1;
#endif
float4 Custom_VS_Position(vsIn In)
{
	float3 P = mul(In.Pos, matWorld);
	float force_x = vecSkill1.x; 
	float force_y = vecSkill1.y;
	float speed = sin((vecTime.w+0.2*(P.x+P.y+P.z)) * vecSkill1.z);
	
	if (In.Pos.y > 0 ) // move only upper part of tree
	{
		In.Pos.x += speed * force_x * In.Pos.y;
		In.Pos.z += speed * force_y * In.Pos.y;
		In.Pos.y -= 0.1*abs(speed*(force_x+force_y)) * In.Pos.y;
	}
	
	return mul(In.Pos,matWorldViewProj);
}

#define CUSTOM_PS_EMISSIVEMASK
float Custom_PS_EmissiveMask(vsOut In, float emissive)
{
	return vecSkill1.w;
}


#include <scObject>





Shade-C EVO Lite-C Shader Framework
Re: Shade-C v0.91 BETA S1 RELEASED [Re: BoH_Havoc] #407811
09/19/12 15:51
09/19/12 15:51
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Awesome! I´ll try it as soon as possible!
Originally Posted By: Rei_Ayanami
Btw, Slender is being redone, more professionally by the guy and a team now. Just FYI

Hmm bad smirk
However, i´m still gonna finish this, just to test the capabilities of Shade-C wink


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Shade-C v0.91 BETA S1 RELEASED [Re: BoH_Havoc] #407812
09/19/12 16:01
09/19/12 16:01
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Originally Posted By: BoH_Havoc

This might be the default.fx or d3dcompiler_42.dll missing...try the new Update, i changed some things so this shouldn't happen again. Please let me know if it works.


Still getting that error smirk


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Shade-C v0.91 BETA S1 RELEASED [Re: alibaba] #407896
09/20/12 15:16
09/20/12 15:16
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I will implement my bloom (and maybe some other) shaders to Shade-C this weekend if I'll have enough time.

But I've got 2 questions:
Does Shade-C already support adaption and does it support higher color-ranges than RGBA 0-255 (HDRR)


POTATO-MAN saves the day! - Random
Re: Shade-C v0.91 BETA S1 RELEASED [Re: Kartoffel] #407952
09/21/12 21:10
09/21/12 21:10
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
Quote:
Still getting that error smirk


I'll have a look at it again then wink

Quote:
Does Shade-C already support adaption and does it support higher color-ranges than RGBA 0-255 (HDRR)


adaption is not supported at the moment. You'll have to do the luminance map downsampling yourself. Lighting supports MDR-HDR values (medium to high range). To Unpack Lighting, #include <scUnpackLighting> and use float4 UnpackLighting(float4 input) to unpack. Lighting is stored in sc_screen_default.renderTargets.deferredLighting .
Everything else is non-HDR. However you can encode RGB to Log LUV to get a higher range. The functions for that are already implemented. To use, simply #include <scRGBtoLogLUV> or #include <scLogLUVtoRGB>. You can then use the functions float4 RGBtoLogLUV(float3 input) and float3 LogLUVtoRGB(float4 input).
The current pipeline is:
gBuffer->lighting->ssao->final composition using lighting,color,ssao,etc->antialiasing->forward rendering->refractions->DOF->Bloom/HDR
So i guess you'd have to encode the "final composition" part to LogLUV and decode in Bloom/HDR

Please let me know if you need something for your HDRR implementation and i'll try to implement it as soon as possible. laugh

[edit] Please get the latest version, there was a small bug with LogLuv encoding. -> https://github.com/BoHHavoc/ShadeC-EVO

Last edited by BoH_Havoc; 09/22/12 12:37.

Shade-C EVO Lite-C Shader Framework
Re: Shade-C v0.91 BETA S1 RELEASED [Re: BoH_Havoc] #408021
09/23/12 21:08
09/23/12 21:08
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I had some problems when adding new shaders and changing the order of the hdr render-chain... smirk
( I tried to add another bloom layer which uses the first bloom as source image for a second, high-radius bloom blur but with leaving the first bloom as source image for the lensflare crazy )

...looks like this was a bit too much for the beginning grin

However, I think and I hope that I finally understand it now smile
I started again from zero and I haven't had any problems this time.

At the moment I keep the bloom and lensflare images seperate to use alpha-blending for the bloom and add-blending for the lensflares with a setting to prevent overexposure.
For this I split sc_hdr.fx into sc_hdr_BloomAndLens.fx and sc_hdr_BloomOnly.fx.

Here is a screenshot which shows the new bloom effect pretty good.

I also added the integer settings.hdr.quality to change the downsampling and bloom quality with
SC_LOW: downsampling with 1 sample per pixel, 1 bloom-stage
SC_MEDIUM: downsampling with 7 samples per pixel, 1 bloom-stage
SC_HIGH: downsampling with 11 samples per pixel, 2 bloom-stages
SC_ULTRA: downsampling with 13 samples per pixel, 2 bloom-stages

Higher quality downsampling will prevent aliasing and makes it possible to use more downsampling and results in smoother blurring.
the bloom quality isn't affected by it, yet but this will be the next thing I'll add smile

I think I'll also add a video-grain effect, and if it's not too hard an adaption shader.

Last edited by Kartoffel; 09/23/12 21:26.

POTATO-MAN saves the day! - Random
Re: Shade-C v0.91 BETA S1 RELEASED [Re: Kartoffel] #408072
09/24/12 17:33
09/24/12 17:33
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Any idea why all my models and the level is all blue?
Its the same blue as my levelbackground.

Page 44 of 61 1 2 42 43 44 45 46 60 61

Moderated by  aztec, Blink, HeelX 

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