I Hacked Diablo II To Use Modern Graphics

Nathan Baggs
12 Sept 202413:16

Summary

TLDRIn this video, the creator tackles the challenge of enhancing the graphics of the 25-year-old game, Diablo I, for modern hardware. They explore the game's rendering backends, focusing on Glide, and develop a Glide wrapper to translate its API calls to the more contemporary Vulkan API. The process involves debugging, understanding Glide's texture management, and overcoming API differences. The video offers a deep dive into graphics API translation, showcasing the complexities of bridging old and new technologies.

Takeaways

  • 🎮 The video discusses hacking the 25-year-old game Diablo I to render with modern graphics technology.
  • 📽️ The original Diablo I is still popular, and many prefer it over the remastered edition, despite its outdated graphics on modern screens.
  • 💻 The game supports three rendering backends: Direct Draw, Direct 3D, and Glide, with Glide being the most optimized but unsupported on modern hardware.
  • 🛠️ A Glide wrapper has been created to trick the game into using OpenGL, serving as a bridge between the old and new APIs.
  • 🔧 The process involves creating a custom library that mimics the Glide API, with functions that log calls to a file for analysis.
  • 👨‍💻 The video creator attempts to use the Vulkan API, a modern graphics system, to replace Glide, despite its complexity.
  • 📚 The video highlights the importance of reading documentation, as misunderstanding function return values and data formats caused initial failures.
  • 🖼️ The process of extracting and rendering textures from the game is detailed, including handling palettes and converting pixel data.
  • 🔄 The video creator encounters synchronization issues between the game's texture loading and the Vulkan API's rendering process.
  • 🕹️ The final result is a proof of concept that shows the game's sprites rendered with textures in a modern graphics context, though not without challenges.

Q & A

  • What is the main challenge the author faces when trying to render Diablo I with modern graphics technology?

    -The main challenge is that Diablo I, a 25-year-old game, was not designed with modern graphics hardware in mind. The game's rendering backends, Direct Draw, Direct 3D, and Glide, are outdated, and Glide, which the game was optimized for, is not supported by modern graphics cards without additional workarounds.

  • What does the author mean by 'hacks' in the context of enhancing Diablo I's graphics?

    -The 'hacks' refer to modifications and workarounds that the author implements to enable the game to render with modern graphics technology despite its age and the limitations of its original design.

  • Why does the author choose to work with the Glide API instead of Direct Draw or Direct 3D?

    -The author chooses to work with the Glide API because the game was optimized for it. However, Glide is not supported by modern graphics cards, so the author aims to create a wrapper that makes the game think it's using Glide while actually utilizing a more modern API like OpenGL or Vulkan.

  • What is the purpose of creating a Glide wrapper?

    -The purpose of creating a Glide wrapper is to provide a translation layer between the old Glide API and a modern graphics API like Vulkan. This allows the game to continue using its Glide calls while actually rendering with modern graphics capabilities.

  • What is Vulkan, and why does the author choose to use it for this project?

    -Vulkan is a modern graphics API designed to give graphics programmers full control over their hardware. It is chosen for this project because it offers a more direct and efficient way to interact with the graphics card, which is necessary for translating the older Glide API calls.

  • How does the author force Diablo I to use the Glide backend?

    -The author forces Diablo I to use the Glide backend by passing a specific flag ('D3dfx') to the game, which directs the game to use the Glide API for rendering.

  • What issues arise when the author tries to load a 64-bit library with a 32-bit game?

    -When the author tries to load a 64-bit library with a 32-bit game, the game crashes on the first function call due to a bad read pointer, indicating a compatibility issue between the game's architecture and the library.

  • Why does the game crash when the author's custom Glide library is loaded?

    -The game crashes because the author's library is 64-bit and the game is 32-bit, leading to compatibility issues. Additionally, the game expects the functions to clean up the stack, which is not happening due to the calling convention used in the author's library.

  • How does the author address the issue of function names being decorated by the compiler?

    -The author addresses the issue of function names being decorated by providing a .def file, which instructs the compiler to not change the function names, allowing the game to correctly call the functions from the custom library.

  • What is the significance of the function 'grSTWinOpen' in the context of this project?

    -The function 'grSTWinOpen' is significant because it is part of the Glide API that initializes the Glide rendering context. The author's incorrect return value from a function with this name initially caused the game to crash, highlighting the importance of accurate API emulation.

Outlines

00:00

🎮 Enhancing Diablo I with Modern Graphics APIs

The script begins with an exploration of enhancing the graphics of Diablo I, a 25-year-old game, for modern hardware. Despite Blizzard's remastered edition, the original game remains popular. The author addresses the poor visual quality on modern displays due to the lack of graphical settings and the game's reliance on outdated rendering backends like Glide, which is unsupported on modern graphics cards. To resolve this, a Glide wrapper is mentioned, which tricks the game into using OpenGL calls, serving as a bridge between the old and new APIs. The author embarks on creating a similar wrapper for the Vulkan API, which offers full control over graphics hardware but is significantly more complex than Glide. The process involves creating a custom library that mimics Glide's interface, handling calling conventions, and debugging issues related to function arguments and memory management.

05:00

🔧 Debugging and Integrating Vulkan with Diablo I

In the second paragraph, the focus shifts to debugging and integrating Vulkan with Diablo I. The author details the process of intercepting Glide commands and redirecting them to Vulkan. This involves understanding and replicating Glide's API functions, managing graphics memory, and handling window size and resolution issues. The author also discusses the challenges of translating Glide's state machine approach to Vulkan's more hands-on hardware control. The narrative includes overcoming validation errors, dealing with window resizing, and addressing issues related to texture mapping and palette formats. The author captures the palette data and decodes it to store images, eventually rendering them using Vulkan, despite initial color and synchronization challenges.

10:02

🖼️ Rendering Textures and Sprites with Vulkan

The final paragraph delves into the rendering process, where the author tackles the complexities of translating Diablo I's 2D sprite rendering using Glide to Vulkan. It covers the intricacies of vertex data interpretation, the conversion of draw calls to Vulkan, and the challenges of coordinate systems and winding orders. The author experiments with different approaches to texture management, eventually settling on updating a descriptor set for texture binding. The narrative highlights the API design differences between Glide and Vulkan, the synchronization issues between texture access and game state, and the trade-offs made in the implementation. The author concludes with a reflection on the learning process and the decision to share the experience in a follow-up video on reverse-engineering Starcraft.

Mindmap

Keywords

💡Diablo I

Diablo I is a classic action role-playing game released in 1996 by Blizzard Entertainment. It is the first installment in the Diablo franchise and has maintained a cult following despite its age. In the video, the speaker is interested in enhancing the game's graphics for modern hardware, which is a testament to its enduring popularity. The game's graphics are described as looking outdated on a modern monitor, prompting the exploration of hacks to improve the visual experience.

💡Modern Graphics Technology

Modern Graphics Technology refers to the current state-of-the-art in rendering and displaying images, which has evolved significantly since the release of Diablo I. The video discusses the challenges of updating a 25-year-old game to utilize these technologies. The speaker aims to use modern APIs like Vulkan to render the game with contemporary graphics, despite the original game being designed for older APIs like Glide.

💡Hacks

In the context of the video, 'hacks' refers to modifications or workarounds that enable the game to run with improved graphics on modern systems. The speaker explores various hacks, including creating a wrapper for the Glide API, which tricks the game into thinking it's using its original rendering backend while actually utilizing modern graphics APIs like Vulkan. This is a key part of the video's exploration into updating the game's graphics.

💡Glide API

Glide was a graphics API developed by 3dfx for their line of 3D graphics accelerators. It was used by Diablo I for rendering graphics. In the video, the speaker discusses the game's optimization for Glide, which is no longer supported by modern graphics cards. To overcome this, the speaker creates a 'Glide wrapper' to translate Glide calls to Vulkan, illustrating the technical depth of the project.

💡Vulkan API

Vulkan is a modern, high-performance graphics API developed by The Khronos Group. It is designed to give developers more direct control over the GPU, which can lead to better performance. The video's speaker uses Vulkan as the target for the game's graphics rendering after translating the Glide API calls. This is a significant part of the hack, as it involves complex programming and understanding of both APIs.

💡Rendering Backends

Rendering backends are the underlying systems that handle the process of drawing images on the screen. The video mentions that Diablo II supports three rendering backends: Direct Draw, Direct3D, and Glide. The speaker focuses on the Glide backend, which was the game's original optimization, and creates a workaround to use Vulkan instead.

💡Graphics Card Memory Allocations

Graphics Card Memory Allocations refer to the process of assigning memory on the graphics card for storing textures, vertex data, and other graphical elements. In the video, the speaker discusses managing these allocations as part of the process of adapting the game to use Vulkan, which requires more manual control over these resources compared to older APIs like Glide.

💡Stack Cleanup

Stack Cleanup is a programming concept where the function cleans up the stack after its execution, which is necessary for maintaining proper call stack order and avoiding memory corruption. The video mentions the need for stack cleanup in the context of changing the calling convention to 'stdcall' to ensure compatibility with the game's expectations.

💡Graphics Memory

Graphics Memory refers to the dedicated memory on the graphics card used for storing graphical data. In the video, the speaker manipulates the game's perception of available graphics memory by returning maximum values from functions that report memory availability, which is a workaround to ensure the game believes it has enough resources to run.

💡Coordinate Systems

Coordinate Systems in graphics programming define the framework for positioning graphical elements on the screen. The video discusses the differences between the coordinate systems used by Glide and Vulkan, which the speaker must account for when translating the game's rendering calls. This involves translating screen space coordinates to normalized device coordinates for Vulkan.

💡Texture Mapping

Texture Mapping is a graphical technique that involves applying a texture (an image) to a surface of a 3D model or a 2D sprite. The video discusses the process of extracting texture data from the game and rendering it using Vulkan. The speaker explores functions like 'grTextDownloadMipMap' to understand and replicate the game's texture mapping process.

Highlights

The quest to enhance the graphics of the 25-year-old game Diablo I using modern technology.

Diablo I's enduring popularity despite the release of a remastered edition.

The original game's poor visual appearance on modern hardware due to lack of settings.

Discovery of a Blizzard Forum post discussing Diablo 2's three rendering backends: Direct Draw, Direct 3D, and Glide.

Innovation of a Glide wrapper to trick the game into using a modern API like OpenGL.

Decision to create a Vulcan API wrapper instead for full control over graphics hardware.

Vulkan's complexity with hundreds of lines of code required to render a simple triangle.

Process of forcing the game to use the Glide backend by passing the 'D 3dfx' flag.

Creation of a custom library 'Glide 3x.dll' to emulate the Glide API for the game.

Debugging the game to understand how it interacts with the Glide API.

Fixing a critical bug by changing the calling convention to 'stdcall'.

Overcoming issues with function name decoration by using a .def file in MSVC.

Tracing and fixing a critical section deletion error in the game's code.

Understanding the Glide API's texture management through 'grTexMinAddress' and 'grTexMaxAddress'.

Initial failure and subsequent success in rendering a model using Vulkan.

Addressing a Vulkan validation error by recreating the swap chain.

Extracting and decoding texture data from the game using 'grTexDownloadMipMap'.

Challenges in interpreting the game's vertex data for rendering.

Conversion of Glide draw calls to Vulkan calls and troubleshooting a blank screen.

Synchronization issues between Glide and Vulkan APIs in texture management.

Final visualization of the game's graphics using the custom Vulcan wrapper.

Reflections on the complexity of juggling two different graphics APIs and the learning process.

Transcripts

play00:00

I'm here to answer the age-old question

play00:02

can you hack a 25-year-old game to

play00:04

render with modern Graphics

play00:06

technology despite being released in the

play00:08

quarter of a century ago Diablo I is

play00:10

still immensely popular and despite

play00:12

Blizzard's attempt to resell the

play00:13

experience with their remastered Edition

play00:15

the original is still a lot of people's

play00:16

preferred

play00:20

option however there's some interesting

play00:22

hacks that you can do to get the most

play00:23

out of the original on Modern Hardware

play00:25

hacks that are worth taking a deep dive

play00:27

into so I bought a copy of the original

play00:29

from blizzard and and because it's still

play00:30

for sale I've not reverse engineered the

play00:32

CD key like I've had to for other games

play00:34

before the problem is that it looks like

play00:36

total ass on my modern big screen

play00:38

monitor and there's no settings to be

play00:40

able to change

play00:42

it looking around and I've ended up at

play00:45

this blizzard Forum post the gist is

play00:47

that Diablo 2 supports three rendering

play00:49

backends direct draw direct 3D and

play00:53

glide the game was optimized for the

play00:55

Glide API but this isn't supported by

play00:57

modern graphics cards unless you've got

play00:59

a card lying

play01:01

around so what some enterprising person

play01:04

done is write a Glide rapper basically

play01:06

to the game it thinks it's cing the

play01:08

Glide API but really it forwards those

play01:10

calls onto openg g a more modern API

play01:13

effectively it's providing a translation

play01:15

layer between the old and the new

play01:17

API now presumably this all works but I

play01:20

don't see why Sven gets to have all the

play01:22

fun this is an interesting problem to

play01:23

solve so let's do it ourselves but for

play01:28

Vulcan if you're unaware then then

play01:30

Vulcan is a modern Graphics API designed

play01:32

to give Graphics programmers full

play01:33

control over their Hardware it's a

play01:35

similar design philosophy to direct X12

play01:38

and metal and it's the API used to

play01:40

program the latest Doom

play01:44

games the fun part is that Vulcan is

play01:47

immensely complicated it takes hundreds

play01:50

of lines of code just to render a

play01:51

triangle and involves managing your own

play01:52

graphics card memory allocations and

play01:54

fences and semaphores so presumably it's

play01:57

going to be quite a bit different to a

play01:58

20-year-old Graphics API

play02:00

first things first we need to see how

play02:02

the game tries to load an interact with

play02:04

glide you can Force the game to use the

play02:06

Glide backend by passing the flag D 3dfx

play02:09

to the game which obviously it's not

play02:11

happy

play02:12

about opening the game in gidra and

play02:14

tracing that flag through we end up at

play02:16

this function which tries to load the

play02:18

Glide DL from dis and resolve all the

play02:20

functions this will be our in if we

play02:23

create our own Library called Glide 3x.

play02:25

DL and Export the same functions then

play02:26

the game will happily load and call

play02:28

those for us I found some header files

play02:30

from the Glide API so I've recreated the

play02:32

exact interface for the library with the

play02:34

correct arguments and types I've just

play02:36

added a simple implementation that logs

play02:38

the call to a file and I've built it as

play02:40

a shared Windows Library however it's

play02:42

not loading of course by default it's

play02:44

64-bit which Diablo certainly isn't okay

play02:47

so it loads my library but it crashes on

play02:49

the first call somewhere in is bad read

play02:53

pointer if we open up in a debugger we

play02:55

can see that the args for the function

play02:57

are still on the stack after the

play02:58

function call which suggests that the

play03:00

game was expecting the c e i the

play03:02

function to clean it up and if we look

play03:04

inside the function we can see that

play03:06

there's just a r at the end so there is

play03:08

no stack cleanup from the function this

play03:10

can be fixed by changing the calling

play03:12

convention to stood call which among

play03:14

other things will cause the emitted code

play03:16

to clean up the stack ARS at the end of

play03:18

the function and now I can't find any of

play03:20

my functions turns out that when you use

play03:22

store with msvc it decorates the

play03:24

exported function names essentially

play03:26

changing their names but we can fix this

play03:29

by providing a def file which tells the

play03:31

compiler no please don't change my

play03:32

function names for me okay so we're

play03:34

starting to call more functions so still

play03:36

getting an error but from the log it's

play03:38

been called from GL Glide shutdown so

play03:40

something is failing and presumably

play03:42

doing some cleanup tracing it through we

play03:44

can see it's called from a function that

play03:46

deletes a critical section and frees the

play03:48

Glide library and this is called as an

play03:50

at Exit Handler so when the game exit it

play03:52

automatically calls this function so

play03:54

I've traced through the code and the

play03:56

failing call is gr SST win open and the

play04:00

problem is entirely my fault I naively

play04:03

assumed that returning zero would mean

play04:04

success and then any other integer would

play04:06

indicate a failure however if i'

play04:08

bothered to read the documents I would

play04:10

see that this function returns an fx bll

play04:12

so in fact one means success and zero

play04:14

means failure and after fixing that it's

play04:17

calling some graphics looking functions

play04:19

but now it crashed in gr text combine

play04:22

never mind it was a bug in my code don't

play04:24

roll your own log

play04:27

Library so the program now ends after

play04:29

calling grx Min address and grx Max

play04:32

address H so I found the docs for the

play04:36

Glide API and things are starting to

play04:37

make a bit more sense now the way the

play04:39

Glide API works is you upload texture

play04:41

data to a specific address of your

play04:43

choosing in the texture map unit or tmu

play04:46

but to find the address range you can

play04:48

copy to you call gr text Min address and

play04:50

gr text Max address as I just returned

play04:52

Zero from both of these the game thinks

play04:54

there's zero Graphics memory and

play04:56

promptly exits now we're not emulating a

play04:58

tmu we're just going to pass that data

play05:00

eventually onto Vulcan so let's just let

play05:02

the game think it has the maximum

play05:03

possible amount of Graphics memory it

play05:05

works kind of we get the game sound and

play05:08

a continuous stream of Glide commands in

play05:10

the log so now we need to start wiring

play05:13

this up to Vulcan luckily I've been

play05:15

playing around with Vulcan as part of a

play05:17

separate side project so I've got a lot

play05:18

of the boiler plate already written

play05:20

we've got a black box we're basically

play05:22

done just got to figure out how to do

play05:24

Vulcan things within it now so the game

play05:27

calls gr buffer swap at the end of the

play05:29

frame so we can use that to issue some

play05:30

Vulcan draw calls and we can render a

play05:33

random model I mean it's supposed to be

play05:34

rotating and it crashes after a few

play05:36

seconds but it's a start it doesn't like

play05:38

the size of my window

play05:41

H obviously need to pass W popup to

play05:44

adjust window wck now I'm getting a

play05:47

weird Vulcan validation error V error

play05:50

out of date cah so apparently I need to

play05:53

recreate my swap chain but now I get a v

play05:55

error native window Inus error

play06:00

so most of the time a swapchain goes out

play06:02

a date it is because the window was

play06:03

resized but as far as I can tell I'm not

play06:05

resizing the window however having a

play06:07

look through my bodge log file I can see

play06:09

there are several calls to the window

play06:11

open function with different resolutions

play06:13

so maybe it's creating a separate window

play06:15

for the intro cinematic and then the

play06:17

game itself just going to add some hack

play06:18

into the code to ignore the first two

play06:21

calls kind of works audio still playing

play06:24

and it doesn't crash however this model

play06:26

is supposed to be rotating I think the

play06:28

frame rate isn't right if if I just

play06:29

increase the rotation speed then it

play06:31

works I'm pretty sure that's how most

play06:32

game bugs are

play06:38

fixed I think the next step is to try

play06:40

and extract the textures and looking

play06:42

through the logs and the docs gr text

play06:44

download M map is probably the function

play06:46

we want this allows you to specify the

play06:48

texture data at potentially multiple

play06:50

levels of detail so the arguments are a

play06:52

bit strange I was hoping for a width

play06:54

height and pixel format but instead

play06:55

we've got small L log 2 and large L log

play06:58

2 small L log 2 is the logarithmic base

play07:02

two of the largest dimension of the

play07:03

lowest resolution M

play07:06

map small L log 2 is the logarithmic

play07:09

base 2 of the largest dimension of the

play07:12

lowest resolution M

play07:18

map small log log 2 is the logarithmic

play07:22

base 2 of the largest dimension of the

play07:24

lowest resolution M map I am slowly

play07:28

descending into madness with this okay

play07:30

so after passing the doc several times I

play07:32

think I finally understand what's going

play07:34

on basically your image data array can

play07:37

contain the same image at several

play07:38

different resolutions small L log 2

play07:41

tells you what the smallest dimension of

play07:43

those images will be and large log log 2

play07:46

tells you the largest but is that the

play07:48

width or the height well for that you

play07:50

need to look at the aspect ratio log two

play07:53

which states that if the aspect ratio is

play07:54

positive then s will be the larger

play07:56

dimension of the M map and if it is

play07:57

negative then T will be the larger di

play07:59

menion so basically given these three

play08:01

bits of information you can infer how

play08:03

many images are in the data array and

play08:06

what their resolutions

play08:07

are or you can just use this lookup

play08:09

table the do gives

play08:11

you remember this log 2 nonsense was

play08:14

added in Glide 3 so just bear that in

play08:16

mind if you're porting code from Glide

play08:18

2 luckily for us the game is Just

play08:20

rendered as 2D Sprite so there's just

play08:22

one log level per image of course just

play08:25

knowing the Size Doesn't really help us

play08:26

when we're staring down the barrel of a

play08:27

void pointer we need to know what form

play08:29

the pixel data is in I was hoping for

play08:31

RGB triplets or something easy to decode

play08:34

but all our data is in format number

play08:36

five or

play08:38

p8 this is an 8bit pallet where each

play08:40

bite is actually an index into a table

play08:42

which stores the RGB values so it's

play08:45

compressed via a lookup table but where

play08:47

is the pallet stored this looks like it

play08:49

comes from the gr text download table

play08:51

which has the gr text pallet format

play08:54

seems a missed opportunity for a game

play08:56

called Diablo to not use the gr text

play08:58

pallet 6666 text

play09:00

format so I capture the pallet table in

play09:02

flight and use that data to decode and

play09:04

store the images to disk they're kind of

play09:07

right I can make out what they're

play09:08

supposed to be but the colors are all

play09:12

wrong if only I had read the

play09:15

docs a color palette is an array of 256

play09:18

a RGB colors not RGB colors even though

play09:22

it says that the AL component is ignored

play09:24

fixing that and a few other bugs and now

play09:25

I can dump all the games textures as

play09:27

they're loaded nice

play09:32

now for the rendering it looks like the

play09:34

game is using gr draw vertex array

play09:37

contiguous one of my favorites the args

play09:40

are pretty straightforward which is a

play09:42

surprise given what we've seen so far

play09:44

mode says how to interpret the vertices

play09:46

count is how many vertices are pointed

play09:48

to the vertex data and the stride which

play09:50

is the distance in bites between each

play09:52

block of vertex data all the Calles are

play09:54

in Triangle fan mode and we have four

play09:55

vertices so presumably we're rendering

play09:57

2D Sprites as quads

play10:00

so how does Glide know how to interpret

play10:02

the data hanging off this void pointer

play10:04

that's done by some proceeding calls to

play10:06

gr vertex layout which tells the API

play10:08

what each block of vertex data looks

play10:10

like for us that's an XY chord A cpram

play10:13

that seems to always be one a Vertex

play10:15

color which seems to always be white and

play10:17

then the texture coordinates I've

play10:18

recreated this layout as a struct so we

play10:20

can interact with the raw vertex data

play10:22

interestingly it size is 24 bytes but

play10:24

the stride is 28 bytes so maybe there's

play10:27

some padding just had a a minor disaster

play10:30

whilst I'm not actually rendering

play10:31

anything to the screen it's still

play10:33

accepting Mouse clicks and I

play10:34

accidentally clicked something on the

play10:35

blank screen which caused the game to

play10:37

update and now every time I run it I

play10:39

just get this error box ah a reinstall

play10:42

has fixed it which is a relief I've

play10:44

converted these draw calls to Vulcan

play10:46

calls and I get a blank screen which is

play10:49

not what I was

play10:50

expecting using render I can see the

play10:53

sprite's been sent to Vulcan but there's

play10:55

a lot that can go wrong here difference

play10:57

in Glide and Vulcan coordinate systems

play10:59

different winding order a bug in my

play11:01

Vulcan

play11:02

code a lot of Graphics debugging is

play11:05

trying to figure out why a screen is

play11:06

blank when you would 100% like it to not

play11:08

be anyway I had a few bugs which I fixed

play11:11

and I realized that Glide was supplying

play11:12

the coordinates in screen space and I

play11:14

needed to translate those to normalized

play11:16

device

play11:17

coordinates obviously so now we can draw

play11:20

a random colored quad wherever the game

play11:22

will draw a

play11:23

texture so now we just need to connect

play11:25

up the textures due to the differences

play11:28

in API my initial ual thought was just

play11:30

to use bindless textures this is a

play11:32

unbounded global array of textures that

play11:34

the shaders can access and then as the

play11:36

game was loading the textures I could

play11:37

just update that Global array and

play11:39

provide each Sprite with an index into

play11:41

that ironically this would then mean

play11:43

that the game would require a fairly

play11:45

more than graphics card however like

play11:47

everything in Vulcan it's pretty

play11:48

complicated and the mess of Vulcan code

play11:50

that I've lashed together to get me this

play11:52

far doesn't really lend itself well to

play11:54

this design so instead I'm just going to

play11:56

update the descriptor set to have one

play11:58

large fix size array that's that's bound

play11:59

to the fragment Shader I'm wondering

play12:01

what the maximum number of textures I

play12:03

combin at once is the Oracle says it's

play12:06

128 however my GPU says it'll handle 10

play12:10

14,870 so I think we're going to be okay

play12:13

so I've uploaded all the textures and it

play12:15

doesn't look right getting

play12:18

better and we're pretty much there all

play12:21

of these graphical issues are definitely

play12:23

solvable problems however the real issue

play12:25

is that Glide and Vulcan are just chalk

play12:27

and cheese when it comes to API design

play12:29

Glide is a state machine where you just

play12:31

update the state that you need for each

play12:33

call and Vulcan is just a full control

play12:35

over your Hardware Beast the current

play12:37

solution relies on you running the game

play12:38

for a bit dumping the textures and then

play12:40

the Vulcan run uploading them all in one

play12:42

go to the GPU so if the game accesses

play12:45

Textures in a different order between

play12:46

runs then it will just get out of sync

play12:48

which is probably What's Happening Here

play12:50

of course the ideal solution would be to

play12:52

modify the Vulcan to upload these

play12:53

textures on the fly but then you have to

play12:55

handle the synchronization between

play12:56

various cues and pipelines and not to

play12:59

ruin the illusion of YouTube magic but

play13:00

it's taking me 4 weeks just to get to

play13:02

this and my brain is starting to melt

play13:04

from juggling two completely different

play13:06

Graphics apis but if you found this lowl

play13:08

dive fun and want to see how I reverse

play13:10

engineered the original Starcraft game

play13:12

then check out this next video

Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
Game HackingGraphics APIDiablo IModern HardwareGlide EmulationVulkan ProgrammingGraphics DebuggingSoftware Reverse EngineeringGame RemasteringAPI Translation
Besoin d'un résumé en anglais ?