4 registered members (ozgur, Ayumi, VHX, monarch),
1,161
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: How was this Game Rendered?
[Re: Dooley]
#481877
11/10/20 15:27
11/10/20 15:27
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
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): 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 RenderingSingle-Pass Wireframe Rendering Explained and Extended
Last edited by 3run; 11/10/20 16:18.
|
|
|
Re: How was this Game Rendered?
[Re: Dooley]
#481881
11/11/20 07:02
11/11/20 07:02
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
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.
|
|
|
Re: How was this Game Rendered?
[Re: Dooley]
#481883
11/11/20 16:22
11/11/20 16:22
|
Joined: Jul 2007
Posts: 619 Turkey, Izmir
Emre
User
|
User
Joined: Jul 2007
Posts: 619
Turkey, Izmir
|
What about pp edge detection shader, like sobel?
#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);
}
|
|
|
|