Lolizlol

Warper
Member
Joined
Oct 13, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Is there any way I can switch the graphics renderer to DirectX (or is it already DirectX?)
 

MoonBunny

:^)
Veteran
Joined
Oct 4, 2020
Messages
55
Reaction score
61
First Language
English
Primarily Uses
RMMV
From my understanding, you can either render with Canvas or WebGL. Is there a reason you specifically want DirectX?
 

burbigo3

Villager
Member
Joined
Aug 18, 2020
Messages
12
Reaction score
2
First Language
French
Primarily Uses
Other
I usually do this with Canvas
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
966
Reaction score
470
First Language
PT-BR
Primarily Uses
RM2k3
Hello welcome!

Games made with MV, MZ or VN Maker use WebGL because they work inside a Chromium-based WebKit, at least that's what I noticed looking at the console.

DirectX does not support web pages.

DirectX was used from Rm2k to RmVXA, I believe the previous ones didn't.

Remember that after having resurrected the Rm2k3 its renderer was replaced by GDI precisely because of the newer machines:


DirectX stopped in version 9 and has had no further updates, so it will probably not have browser support.
 

ThinkN

Villager
Member
Joined
Aug 11, 2020
Messages
15
Reaction score
18
First Language
English
Primarily Uses
RMMV
This is a fun, complex question.

The short answer is there is no reason to change anything, the system will choose the best renderer on its own.

If you're playing on Windows, your exported games are likely running DirectX by default, albeit in a very indirect way.

For a more in-depth exploration, it's worth reviewing the stack of technology:

  1. RPGMZ games are written in JavaScript
  2. For most graphics (excluding text*), it uses the library PixiJS
  3. PixiJS uses a combination of JavaScript and shaders written in GLSL to interface with an API called WebGL
  4. WebGL is based on OpenGL, a competitor to DirectX
  5. When you run a game, all those lines of code need to be interpreted by an engine and transformed into code that can be understood by your CPU and GPU
  6. RPGMZ games can run in a browser, or if you export it for Windows/Mac/Linux, it runs in a browser-like environment called nwjs
  7. nwjs is made up from components of Chromium (the open-source version of Google's Chrome browser)
  8. The graphical API layer of Chromium is ANGLE
  9. ANGLE translates OpenGL calls to whichever API is supported by the platform it runs on
  10. The default on most Windows machines is to use Direct3D 11, a subset of DirectX

* Chromium also uses ANGLE for its canvas implementation. So even the graphics functions using Canvas instead of WebGL are translated through ANGLE.

Can you change the rendering back-end?

I think so, although I haven't tested this.

nwjs supports most Chromium command line switches via the package.json file.

It looks like the "use-angle" switch accepts these values:
  • d3d9
  • d3d11
  • warp
  • gl
  • gles

So to indicate you want Direct3D as your preferred renderer, you would insert "--use-angle=d3d11" in the "chromium-args" field of your game's package.json file.

Is it worth doing this? No, probably not. But it's fun to learn about the convoluted world of web technology.

Edit notice: I edited a few lines to make it clear I'm focused on the technology of exported games, not on the Maker itself.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,358
Reaction score
8,772
First Language
German
Primarily Uses
RMMV
Another aspect here (and the reason why DirectX was abandoned after VXA) is that DirectX is Windows-Only (or at least was at that time).

You have to ditch DirectX if you want compatibility on non-Windows computers. There have been some implementations to get DirectX simulated on other operating systems, but those are rarely stable because they are rarely done by Microsoft themselves (Microsoft cares only about Windows) and the programmers rarely have the internal access to replicate DirectX completely correct.

So even if you manage to switch your project/game to DirectX it will only result in the deployment to other devices/OS no longer working.
 

Latest Threads

Latest Posts

Latest Profile Posts

aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v
Well, I've got a party tomorrow, and my friends are coming over. I wanted to work a bit on the Fandom Scouts assets so I can be ready when that update arrives... in other news, Pizza Time Horror is getting a second teaser, and it shows Cabaret Helen's last performance before the location closed.
Also who used to be scared of Chuck E as a kid? I was! Now I love him!
The new cards and what they do:

(I am clearly not a youtuber... Haha)

Forum statistics

Threads
117,281
Messages
1,106,095
Members
153,456
Latest member
tomdavies
Top