Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 755 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mixing Lite-C shaders with C-script does not work in A8? #405793
08/07/12 12:58
08/07/12 12:58
Joined: Oct 2010
Posts: 73
0110111
C
CodeMaster Offline OP
Junior Member
CodeMaster  Offline OP
Junior Member
C

Joined: Oct 2010
Posts: 73
0110111
hi,

is there any chance to use the lite-c shaders in my c-script project. I have already tried to find out more about this but unfortunately no one could give me some information that would help. Earlier we was able to mix it in A7 (there is a one example in Aum100 or this thred ), but after version A7.50 this is no longer possible. What are the changed in engine that this no longer works? Is there any other way to mix lc with c-script?

Re: Mixing Lite-C shaders with C-script does not work in A8? [Re: CodeMaster] #405800
08/07/12 16:03
08/07/12 16:03
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Shaders have nothing to do with lite-C, they use the HLSL language. But C-Script has no postprocessing functions, so you can only use surface shaders in C-script.

Re: Mixing Lite-C shaders with C-script does not work in A8? [Re: jcl] #405812
08/07/12 21:19
08/07/12 21:19
Joined: Oct 2010
Posts: 73
0110111
C
CodeMaster Offline OP
Junior Member
CodeMaster  Offline OP
Junior Member
C

Joined: Oct 2010
Posts: 73
0110111
i finally got a response from the right person but i think you not understand me jcl. I have already combined the c-script and lite-c, so that i could have a bloom, shade-c hdr, although i still using the c-script.
I managed to combine c-script and lite-c:

on begining my main c-script i has

include <HCS_PP.c>;

beacuse my function main is in c-script and lite-c can't see actions assigned in wed or c-script i make startup function on next way. This is my HCS_PP.c lite-c script (complete demo with soruce can be found in Aum100):

Code:
#define PRAGMA_PATH "shade-c"

#include <acknex.h>
#include <default.c>

#include "mtlView.c"


MATERIAL* mtlGS_Bleach = { effect = "pp_bleach.fx";}

MATERIAL* mtlGS_Color = { effect = "pp_colorshift.fx";}

MATERIAL* mtlGS_Desat = { effect = "pp_desaturate.fx";}

VIEW* viewGS_Color = { material = mtlGS_Color;    flags = CHILD | PROCESS_TARGET; }
VIEW* viewGS_Blech = { material = mtlGS_Bleach; flags = CHILD | PROCESS_TARGET; } 
VIEW* viewGS_Desat = { material = mtlGS_Desat; flags = CHILD | PROCESS_TARGET; }

#include "sc_core.c";

function start_pp()
{
	sc_setup();
	sc_bHDR = 1;
}

void sc_startup() 
{
	viewGS_Color.material.skill1 = floatv(10);
	viewGS_Color.material.skill2 = floatv(10);
	viewGS_Color.material.skill3 = floatv(9);
	viewGS_Blech.material.skill1 = floatv(20);

	start_pp();
	turb_speed=2;
	while(1){
	if ((key_comma)&&(gammahold==0)&&((gamstart-10)>70)){
		gammahold=1;
		gamstart	-=10;
		wait(-0.5);
		video_gamma = gamstart;
		gammahold=0;
	}
	if ((key_period)&&(gammahold==0)&&((gamstart+10)<160)){
		gammahold=1;
		gamstart	+=10;
		wait(-0.5);
		video_gamma = gamstart;
		gammahold=0;
	}
	wait(1);
	}
}



this working a very good and stable in a7, but now when i want to combine this in a8, i just got a error after start code.
i can't back on a7 beacuse you already fix some bugs with whom i had problems in a7. Also i can not translate my game into lite-c beacuse my code is too complex and TOO big (i tried milion times but without luck). This is my last chance to have a nice shaders in my finished game.
Is there any solution to combine again lc and c-script in a8, as i could in a7.50??

Re: Mixing Lite-C shaders with C-script does not work in A8? [Re: CodeMaster] #405813
08/07/12 21:24
08/07/12 21:24
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
#include "sc_core.c";

remove the ;

Re: Mixing Lite-C shaders with C-script does not work in A8? [Re: FBL] #405834
08/08/12 10:20
08/08/12 10:20
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Including lite-C scripts in a WDL script is officially not supported anymore in A8, but this feature was not removed, and should theoretically still work. But of course you should not have errors in the included script.

Also your included startup function makes no sense. If you include a lite-C script, you can use the included functions, but they won't start by themselves.


Re: Mixing Lite-C shaders with C-script does not work in A8? [Re: jcl] #405838
08/08/12 12:11
08/08/12 12:11
Joined: Oct 2010
Posts: 73
0110111
C
CodeMaster Offline OP
Junior Member
CodeMaster  Offline OP
Junior Member
C

Joined: Oct 2010
Posts: 73
0110111
thanks for your response jcl. i just now after long time back version a7.50 and everything works great. Simply when i start same code in A8 i got error acknex.exe has stopped working. Did you sure that this feature was not removed, beacuse i do not have any other idea why this not working in A8? In A8 no matter what is in the included lite-c script engine will crash.


Moderated by  old_bill, Tobias 

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