Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,278 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
HDR #373911
06/14/11 04:13
06/14/11 04:13
Joined: Jul 2008
Posts: 40
V
Vahid_PC_Games Offline OP
Newbie
Vahid_PC_Games  Offline OP
Newbie
V

Joined: Jul 2008
Posts: 40
hi guys.
I'm confused.Please help me for :
How to use "HDR Rendering" in A8.
tanks.

Re: HDR [Re: Vahid_PC_Games] #373917
06/14/11 08:22
06/14/11 08:22
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Have you tried with water.c example from sample folder?

Code:
////////////////////////////////////////////////////////
// Water shader demo.
// Copyright 2010	by oP group Germany.							
// Commercial Edition or above required for shaders
////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
#include <keys.c>
#include <level.c>
#include <entmove.c>
#include <mtlFx.c>
#include <mtlView.c>

#define PRAGMA_PATH "%EXE_DIR%\\templates\\levels";

////////////////////////////////////////////////////////
var water_height,water_ripple,water_scale,hdr_threshold;

FONT* fHelp = "Arial#16bi";

PANEL* pHelp = 
{
	digits(5,5,"[1]/[2] -> water level: %4.1f",fHelp,1,water_height);
	digits(5,20,"[3]/[4] -> wave height: %3.0f",fHelp,1,water_ripple);
	digits(5,35,"[5]/[6] -> wave scale: %3.0f",fHelp,1,water_scale);
	digits(5,50,"[7]/[8] -> HDR threshold: %3.0f",fHelp,1,hdr_threshold);
	digits(5,65,"Cursor,PgUp/Dn -> move camera",fHelp,0,0);
	flags = SHOW;
}

action on_f1_event() { toggle(pHelp,SHOW); }

action water()
{
	fx_mirrorWater();
	while(1) {
		if(key_hit("1")) terrain_raise(me,-0.5);
		if(key_hit("2")) terrain_raise(me,0.5);
// skills are defined as var, but shaders use float values 
// conversion is not automatic here, thus we need floatv/fixv
		if(key_hit("3")) my.skill43 = floatv(fixv(my.skill43)-5);
		if(key_hit("4")) my.skill43 = floatv(fixv(my.skill43)+5);
		if(key_hit("5")) my.skill44 = floatv(fixv(my.skill44)-5);
		if(key_hit("6")) my.skill44 = floatv(fixv(my.skill44)+5);
		if(key_hit("7")) mtl_hdr.skill2 = floatv(fixv(mtl_hdr.skill2)+1);
		if(key_hit("8")) mtl_hdr.skill2 = floatv(fixv(mtl_hdr.skill2)-1);
		water_height = terrain_get_z(my,1);
		water_ripple = fixv(my.skill43);
		water_scale = fixv(my.skill44);
		hdr_threshold = fixv(mtl_hdr.skill2);
		wait(1);
	}
}

action blob()
{
	my.skill42 = floatv(30); // texture influence
	fx_envBump();
	ent_rotate(me,2,1.5,0.5);
}

function main()
{
	if (d3d_shaderversion<2020)
		error("Shaders require Commercial Edition!");
	d3d_antialias = 4;
	video_mode = 8;
	fps_max = 60;
// load a level, and create sky, water, and a model :
	level_load("small.hmp");
	ent_createlayer("skycube+6.dds",SKY | CUBE | SHOW,1);
	ent_create("water.hmp",vector(0,0,-5),water);
	ent_create("blob.mdl",vector(0,0,30),blob);
	vec_set(sun_color,vector(200,240,240));	
	
// set up some parameters and a HDR effect for the camera	
	vec_set(camera.x,vector(-130,0,80));
	camera.tilt = -20;
	def_move(); // activate flythrough

	mtl_hdr.skill3 = floatv(50); // exposure compensation factor
	pp_set(camera,mtl_hdr);
}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: HDR [Re: rojart] #373922
06/14/11 09:59
06/14/11 09:59
Joined: Jul 2008
Posts: 40
V
Vahid_PC_Games Offline OP
Newbie
Vahid_PC_Games  Offline OP
Newbie
V

Joined: Jul 2008
Posts: 40
tanks bro.
but i cant find "entmove.c".please help me.

Re: HDR [Re: Vahid_PC_Games] #373925
06/14/11 10:41
06/14/11 10:41
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Just run the current water.c script and the entmove.c will be included from include folder.

By the way, what version are you using?


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: HDR [Re: rojart] #373928
06/14/11 10:59
06/14/11 10:59
Joined: Jul 2008
Posts: 40
V
Vahid_PC_Games Offline OP
Newbie
Vahid_PC_Games  Offline OP
Newbie
V

Joined: Jul 2008
Posts: 40
i have 3dgs 8.02 Trial.
and "entmove.c" is not exist in "Include" Folder.

Re: HDR [Re: Vahid_PC_Games] #373930
06/14/11 11:03
06/14/11 11:03
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
You can download the new Gamestudio A8 V 8.20 version from here.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: HDR [Re: rojart] #373937
06/14/11 12:14
06/14/11 12:14
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Originally Posted By: source code
// Commercial Edition or above required for shaders


Re: HDR [Re: rojart] #374057
06/15/11 05:24
06/15/11 05:24
Joined: Jul 2008
Posts: 40
V
Vahid_PC_Games Offline OP
Newbie
Vahid_PC_Games  Offline OP
Newbie
V

Joined: Jul 2008
Posts: 40
run it on A8 8.20 Trial and its work.

tanks bro.


Last edited by Vahid_PC_Games; 06/15/11 10:28.

Moderated by  Blink, Hummel, Superku 

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