Gamestudio Links
Zorro Links
Newest Posts
Binance Futures Plugin
by OptimusPrime. 11/27/20 17:03
DirectX : 3d Hardware Reset Failure
by Emre. 11/27/20 11:06
Sortino(vars Data, int TimePeriod): var
by danatrader. 11/26/20 20:45
Need code for Williams Sentiment Index
by danatrader. 11/26/20 20:42
Optimizing global & local parameters
by dBc. 11/25/20 15:16
Enter FOK orders simultaneously
by jcl. 11/25/20 10:55
looking how basic functions are made
by jcl. 11/25/20 10:47
AUM Magazine
Latest Screens
Paradox Vector
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
2 registered members (OptimusPrime, 1 invisible), 494 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MMK, raed, liquidbread, Dmitry_Shesterin, ddczp
18543 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: How was this Game Rendered? [Re: Dooley] #481850
11/09/20 03:31
11/09/20 03:31
Joined: May 2005
Posts: 802
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 802
Chicago, IL
This is awesome! I did not expect someone to write a whole shader ... I really appreciate that. I will see if I can use it, and if it resolves the issue.

Re: How was this Game Rendered? [Re: Dooley] #481851
11/09/20 08:33
11/09/20 08:33
Joined: May 2009
Posts: 5,299
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,299
Caucasus
Glad to be helpful.


Just a quick thoughts: to get specific visuals, not related to visual polygons, maybe you can use two models and two shaders. So first model is the visual shape and it's shader won't draw any wireframes, only solid model. And second model will have specific vertex placement and shader with wireframes. Gonna give it a try, maybe it will work as planned.

Greets!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: How was this Game Rendered? [Re: 3run] #481859
11/09/20 13:32
11/09/20 13:32
Joined: May 2005
Posts: 802
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 802
Chicago, IL
Yes, it works, but the wireframe always seems to be limited to triangles. It ends up looking kind of clunky. It would also require that I re-create every model in my game, which I am trying to avoid.

I am looking into working with the AMD graphics card/drivers/preferences and stuff. I think there may be some settings that could help...

Re: How was this Game Rendered? [Re: Dooley] #481860
11/09/20 15:23
11/09/20 15:23
Joined: May 2009
Posts: 5,299
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,299
Caucasus
Sadly I can't really help with any AMD stuff. Let's hope more advanced users might help.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: How was this Game Rendered? [Re: 3run] #481876
11/10/20 15:10
11/10/20 15:10
Joined: May 2005
Posts: 802
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 802
Chicago, IL
Just to make sure I understand this ... a shader seems to me limited to working with models/textures etc that are already being rendered. It seems like shaders would not be used to draw new images/pixels onto the screen, but rather to modify the ones that are already there. Is that accurate?

Re: How was this Game Rendered? [Re: Dooley] #481877
11/10/20 15:27
11/10/20 15:27
Joined: May 2009
Posts: 5,299
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,299
Caucasus
I'm not sure, if I understood you correctly, but take a look at this video:
What is HLSL?

Edit: I've also made some changes in the wireframe shader, so now you can change its (wireframe) alpha via entitie's skill44.

Edit2: I've found some tips on the web, about (f.e.) removing the inner line in wireframe shader. It's pretty simple (in theory):
Quote
What you want is to only draw lines around the edge of the cube. And there are many ways you can acheive this...

Render a texture on to the cube, which has alpha everywhere but the edges.
Use a pixel shader to turn all pixels that are not at the edge of the cube to alpha. <- This is recommended by me, as you will be able to set the line length around the cube.

Sad thing is, that I don't really know, how to find pixels which aren't on the edge of the polygons...

Source:
How can I get rid of the diagonal wires in wireframe boxes?

Edit3: articles about how to create wireframe shader and remove the inner line (but it's OpenGL):
Single-Pass Wireframe Rendering
Single-Pass Wireframe Rendering Explained and Extended


Last edited by 3run; 11/10/20 16:18.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: How was this Game Rendered? [Re: Dooley] #481880
11/11/20 03:18
11/11/20 03:18
Joined: May 2005
Posts: 802
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 802
Chicago, IL
I just came across the "Lesson 4: Using DirectX functions" part in the manual. I'm wondering if anyone has explored any of these functions...

My guess is that draw_line3d would have to somehow utilize a directx function anyway, and that it would probably be more efficient than anything I could come up with. But maybe it's worth a try?

Re: How was this Game Rendered? [Re: Dooley] #481881
11/11/20 07:02
11/11/20 07:02
Joined: May 2009
Posts: 5,299
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,299
Caucasus
Those lessons are related to the SDK. So they aren't really useful in your case. Lesson 4 just shows how to use DirectX functions from DirectX SDK.

draw_line3d already uses DirectX, because DirectX is responsible for rendering everything in the games window (models, sprites, particles, etc).
draw_line3d uses particles (and it's pretty slow). My guess is, that (as you own A8 pro) you are using particle instancing and it probably doesn't work correctly with AMD cards.
The best way to resolve this problem will be asking jcl directly, maybe he has some thoughts, maybe he can confirm that instancing is only supported by NVIDIA.

Edit: I think it will be MUCH FASTER to use shaders for your needs, but I'm too limited with my knowledge, to write anything more than I've already shared.

Last edited by 3run; 11/11/20 07:03.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: How was this Game Rendered? [Re: Dooley] #481883
11/11/20 16:22
11/11/20 16:22
Joined: Jul 2007
Posts: 582
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 582
Turkey, izmir
What about pp edge detection shader, like sobel?

[Linked Image]

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

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

action ent_act()
{
	while(1)
	{
		my.pan+=3*time_step;
		my.tilt+=3*time_step;
		wait(1);
	}
}
function main()
{
	video_mode=10;
	level_load("");
	ent_create(CUBE_MDL,vector(300,0,0),ent_act);
	ent_create("ball.mdl",vector(300,-50,0),ent_act);
	ent_create("sf_women.mdl",vector(300,50,0),ent_act);
	
	pp_set(camera,mtl_sobel);
	
}

Page 4 of 4 1 2 3 4

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