1 registered members (AndrewAMD),
1,135
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
[Re: William]
#190019
03/25/08 13:10
03/25/08 13:10
|
Joined: Jun 2004
Posts: 655 to your left
BoH_Havoc
OP
User
|
OP
User
Joined: Jun 2004
Posts: 655
to your left
|
Quote:
It seems that you are storing data in these skills. Though, saying the user that these skills are unavoidable used by shade-C
makes a bitter taste on the tongue :-) I was in same situation some weeks ago: for a customer I made a plugin. At first there
were only 6 skills I needed, after some development iterations I used over 30 skills to save and log running data which very
necessary and not able to be reduced anymore. So I created a struct which holds the data and write the adress of the struct
into only one skill. The co-routine which works on that entity with this data than restores by casting each frame a pointer to
that datastructure. To remove the entity I wrote a special function which checks if the linking skill is != 0. If yes, the
entity is using that plugin and the linked datastructure, so it removes it first and after that ent_remove is called. Easy,
isnt it?
I only understood half of it, but i will have a look at it again when i'm less dizzy Reducing the needed skills to 1 is a must!
Quote:
Quote:
I'll have a look at it, but it shouldn't be to much work. But not today, i'm too tired.
Thanks!
Alright here goes: For HDR you have to create 6 views (or less if you only blur it once or twice). 1st view => s_hdrDownsample.fx : applies a 4x downsample 2nd view => s_hdrHighpass.fx : does a highpass for getting the bright parts of the scene 3rd view => s_hdrBlur.fx : blurs the highpass 4th & 5th view => s_hdrHBlur.fx & s_hdrVBlur.fx : blurs it even more 6th view => s_hdrTonemap.fx : upsamples the bloom (we did that in the last 5 views), combines it with the original scene and does tonemapping
the size of view 1-5 has to be a power of 4 (256x256, 512x512, depends on your game's resolution). view1-5.bmap also needs to be a power of 4 (same as size)
s_hdrHighpass.fx vecskill1.x => sets the bloomstrength (range: 0-1) s_hdrBlur.fx & s_hdrHBlur.fx & s_hdrVBlur.fx vecskill1.x => sets the blurstrength s_hdrTonemap.fx vec.skill1.xw => x: applies gamma correction w: size of view 1-5
camera.stage = view1; . . view5.stage = view6;
that should be it (for HDR)
DoF: 4 views for dof + 1 view rendering the depthmap (s_rDepth.fx) 1st view => s_dofDownsample.fx : 4x downsample, you know the drill 2nd & 3rd view => s_dofHBlur.fx & s_dofVBlur.fx : blur it and apply anti edge bleeding 4th => s_dof.fx upample the blurred view, combine it with the original scene using the depthmap
again, view 1-3 have to be a power of 4 and 256˛ oder 512˛ in size/bmap.
s_dofHBlur.fx & s_dofVBlur.fx vecSkill1.x => blurstrength s_dof.fx vecSkill1.w => size of view1-3 | texture TargetMap; //Blurred Scene texture mtlSkin1; // original Scene texture mtlSkin2; // Depthmap
s_rDepth vecSkill1.xyz => x = focal plane pos | y = focal Plane depth / area of sharpness | z = if you set this to 1, the object will be rendered white (=sharp) all the time. The DoF-Depthmap gets rendered to .a ! s_rDepth also outputs a "normal" depthmap to rgb. you can set its values with vecSkill5.xy (x maxDepth | y focal plane)
camera.stage = view1; . . view3.stage = view4;
and thats it for dof. I hope i didn't forget something.
Quote:
edit: i noticed that you kinda did it with the toon shader, but maybe witout bloom it would look better
Yeah, i have HDR and DoF activated on this shot. If you deactivate them there won't be any bloom But thanks for pointing it out, i will write a note after "Cartoonshader" on the site and also upload a new picture.
Quote:
I need a pro... :'(
I don't even have A7 Pro myself. All you need is A7 Com
@William: I have no idea whats happening here. Could you try setting s_dofParams to something like this: var s_dofParams[3] = {900, 80, 2.5};
and then calling s_dofDynFocus(30,10000,1); after s_initShaders()? If everything works out, every object you look at should become sharp.
To output the Depthmap you can use this: open up s_showRT.fx, find this line float4 Color = tex2D(smpSource,(Tex.xy)); and insert this after it Color.rgb = Color.a;
Now call this after s_initShaders(); s_ppe(1,"s_showRT.fx",nullvector); s_ppeTex(1,1,s_bmap_depth);
This should output the DoF-Map. Also please make sure you have set s_bDoF = 1 before callign s_initShaders(). If you don't want to set s_bDoF, please call s_initDepth() so the depthmap gets rendered.
cheers and thanks for all the feedback. I see i have lots to improve
|
|
|
Entire Thread
|
shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
03/23/08 18:43
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
HeelX
|
03/23/08 18:48
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Quad
|
03/23/08 19:35
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
03/23/08 20:11
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Pappenheimer
|
03/23/08 20:40
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
frazzle
|
03/23/08 20:51
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
HeelX
|
03/23/08 20:49
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Pappenheimer
|
03/23/08 21:33
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
JJJohan
|
03/24/08 02:09
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
03/24/08 03:10
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
William
|
03/24/08 08:45
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
DoC
|
03/25/08 10:04
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
PadMalcom
|
03/25/08 12:09
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
03/25/08 13:10
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
PadMalcom
|
03/25/08 13:16
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
HeelX
|
03/25/08 17:27
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
William
|
03/25/08 21:53
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
03/27/08 00:22
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
JibbSmart
|
03/27/08 08:11
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
William
|
03/27/08 08:36
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
03/27/08 15:11
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Slin
|
03/27/08 20:25
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
03/28/08 18:11
|
Fire in the hole!
|
BoH_Havoc
|
03/29/08 01:09
|
Re: Fire in the hole!
|
DavidLancaster
|
03/29/08 08:21
|
Re: Fire in the hole!
|
Quad
|
03/29/08 09:43
|
Re: Fire in the hole!
|
fogman
|
03/29/08 14:33
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
03/29/08 15:07
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
04/01/08 11:53
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
VeT
|
04/28/08 12:57
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
04/28/08 14:27
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
04/28/08 19:21
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Quad
|
04/28/08 20:37
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
04/28/08 23:28
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Ilidrake
|
05/01/08 05:01
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Martek
|
05/01/08 19:45
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Quad
|
05/01/08 20:00
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Martek
|
05/01/08 21:37
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Quad
|
05/01/08 21:50
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
VeT
|
05/06/08 22:16
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
05/07/08 15:03
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Quad
|
05/07/08 15:36
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
MMike
|
05/08/08 16:51
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
05/08/08 18:48
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Helghast
|
05/19/08 13:56
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
05/19/08 14:02
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Helghast
|
05/19/08 14:17
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
05/19/08 17:01
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Helghast
|
05/19/08 17:35
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Helghast
|
05/19/08 21:45
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
05/20/08 19:55
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
VeT
|
06/09/08 20:35
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
06/09/08 21:44
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
VeT
|
06/16/08 07:51
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
06/19/08 22:45
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
06/25/08 01:51
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
06/25/08 14:36
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
06/25/08 16:03
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
06/25/08 18:46
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
06/26/08 01:40
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
06/26/08 15:35
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
06/26/08 16:02
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
06/27/08 15:11
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
mpdeveloper_B
|
06/27/08 15:40
|
car-/metal- & toonshader
|
BoH_Havoc
|
06/27/08 22:33
|
Re: car-/metal- & toonshader
|
mpdeveloper_B
|
06/27/08 23:27
|
Re: car-/metal- & toonshader
|
Quad
|
06/28/08 09:12
|
Re: car-/metal- & toonshader
|
Slin
|
06/28/08 09:17
|
Re: car-/metal- & toonshader
|
Machinery_Frank
|
06/28/08 09:40
|
Re: car-/metal- & toonshader
|
mpdeveloper_B
|
07/09/08 20:13
|
Re: car-/metal- & toonshader
|
BoH_Havoc
|
07/10/08 01:31
|
Re: car-/metal- & toonshader
|
mpdeveloper_B
|
07/10/08 15:03
|
Re: car-/metal- & toonshader
|
BoH_Havoc
|
07/10/08 21:19
|
shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
07/17/08 23:49
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Matt_Coles
|
07/17/08 23:53
|
Re: car-/metal- & toonshader
|
mpdeveloper_B
|
07/18/08 17:03
|
Re: car-/metal- & toonshader
|
BoH_Havoc
|
07/19/08 13:52
|
Re: car-/metal- & toonshader
|
mpdeveloper_B
|
07/19/08 15:15
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
07/21/08 00:36
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/26/08 13:06
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
croman
|
07/26/08 14:33
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/26/08 15:53
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
croman
|
07/26/08 16:53
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/26/08 17:04
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
croman
|
07/26/08 17:32
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/26/08 18:01
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
croman
|
07/26/08 18:04
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/26/08 18:15
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
07/27/08 23:41
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/27/08 23:54
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
BoH_Havoc
|
07/28/08 18:14
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/28/08 19:35
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Arcaine
|
07/31/08 10:20
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
07/31/08 20:32
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
VecG
|
07/31/08 20:56
|
Re: shade-c : lite-c shader project (HDR,DoF,etc)
|
Espér
|
08/02/08 22:17
|
shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
08/19/08 14:30
|
Re: shade-c : dynamic exposure control in action :)
|
mpdeveloper_B
|
08/19/08 15:55
|
Re: shade-c : dynamic exposure control in action :)
|
Samb
|
08/19/08 16:40
|
Re: shade-c : dynamic exposure control in action :)
|
Shadow969
|
08/19/08 19:25
|
Re: shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
08/21/08 17:52
|
Re: shade-c : dynamic exposure control in action :)
|
Samb
|
08/21/08 19:21
|
Re: shade-c : dynamic exposure control in action :)
|
mpdeveloper_B
|
08/22/08 17:28
|
Re: shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
08/26/08 17:08
|
Re: shade-c : dynamic exposure control in action :)
|
Quad
|
08/26/08 17:44
|
Re: shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
08/27/08 23:28
|
Re: shade-c : dynamic exposure control in action :)
|
VeT
|
08/27/08 23:49
|
Re: shade-c : dynamic exposure control in action :)
|
Angelus1818
|
08/29/08 14:10
|
Re: shade-c : dynamic exposure control in action :)
|
Quad
|
08/29/08 15:29
|
Re: shade-c : dynamic exposure control in action :)
|
mpdeveloper_B
|
08/29/08 18:13
|
Re: shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
08/31/08 18:07
|
Re: shade-c : dynamic exposure control in action :)
|
Shadow969
|
08/31/08 18:23
|
Re: shade-c : dynamic exposure control in action :)
|
Angelus1818
|
09/01/08 06:17
|
Re: shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
09/02/08 15:08
|
Re: shade-c : dynamic exposure control in action :)
|
Quad
|
09/02/08 20:12
|
Re: shade-c : dynamic exposure control in action :)
|
BoH_Havoc
|
09/02/08 20:49
|
Re: shade-c : dynamic exposure control in action :)
|
Angelus1818
|
09/02/08 22:21
|
Re: shade-c : dynamic exposure control in action :)
|
VeT
|
09/02/08 23:37
|
Re: shade-c : dynamic exposure control in action :)
|
mpdeveloper_B
|
09/03/08 00:02
|
Re: shade-c : volumetric particles
|
BoH_Havoc
|
09/14/08 22:57
|
Re: shade-c : volumetric particles
|
frazzle
|
09/15/08 07:10
|
Re: shade-c : volumetric particles
|
Poison
|
09/15/08 12:44
|
Re: shade-c : volumetric particles
|
zSteam
|
09/17/08 18:21
|
Re: shade-c : volumetric particles
|
William
|
09/17/08 22:38
|
Re: shade-c : volumetric particles
|
BoH_Havoc
|
09/21/08 13:36
|
Re: shade-c : volumetric particles
|
BoH_Havoc
|
09/22/08 23:37
|
Re: shade-c : volumetric particles
|
Quad
|
09/23/08 09:06
|
Re: shade-c : volumetric particles
|
bstudio
|
09/23/08 09:19
|
Re: shade-c : volumetric particles
|
Poison
|
09/23/08 12:21
|
Re: shade-c : volumetric particles
|
broozar
|
09/23/08 14:06
|
Re: shade-c : volumetric particles
|
zSteam
|
09/23/08 19:47
|
|
|