Adrian Sanchez

204 posts

Adrian Sanchez banner
Adrian Sanchez

Adrian Sanchez

@pervasivesense

Creative programming, games and stuff. Senior Technical Engineer @SquanchGames. Sole proprietor of @SunsetLearn.

California, USA Katılım Aralık 2020
143 Takip Edilen32 Takipçiler
Adrian Sanchez
Adrian Sanchez@pervasivesense·
Please, nobody ever follow me again.
Adrian Sanchez tweet media
English
0
0
0
75
Adrian Sanchez
Adrian Sanchez@pervasivesense·
@twodelab What in the eff?? So is this only the auto LOD graph work that we're seeing here? Does this also implement the optimized mesh disk streaming/compression that Nanite does?
English
1
0
0
556
Adrian Sanchez
Adrian Sanchez@pervasivesense·
I'm guessing at one point we'll have to reinvent memory access from the ground up if we want to see forward progress, which will potentially involve some qubit based memory that exploits entanglement and can get you near instantaneous memory access from any part of the PCB.
English
0
0
0
76
Adrian Sanchez
Adrian Sanchez@pervasivesense·
You CAN pack a lot more transistors into the caches but then you probably get a more complex manufacturing pipeline and indirectly increase the cost of making the die, and even then there might still be some physical limit that we're very close to.
English
1
0
0
86
Adrian Sanchez
Adrian Sanchez@pervasivesense·
The more into computer science I got over the years the more I realized that the whole cache-on-CPU-die concept was never going to be very scalable. The physical size of the die and the caches themselves can only get so large before you hit latency concerns...
English
1
0
1
115
Adrian Sanchez
Adrian Sanchez@pervasivesense·
I never 100% enjoyed the process but I've slowly come to realize that it may be one of those things that is just beneficial against the grain, like brushing your teeth or doing dishes, or waiting a goddamn hour and a half at the DMV.
English
0
0
0
54
Adrian Sanchez
Adrian Sanchez@pervasivesense·
Learning to start and run a business should be as important a learned skill as any other hard skills that can get you job placements. The potential for return is much higher, and it gives you a larger window to earn from the things you love.
English
1
0
0
61
Adrian Sanchez
Adrian Sanchez@pervasivesense·
@falco_girgis I often see large parts of C++ renderers use runtime polymorphic types for rendering abstractions, seems odd to me. Most times you'll know the rendering API to use upfront and can use a policy-based templates to represent the abstractions well enough without virtual dispatch.
English
1
0
2
252
Falco Girgis
Falco Girgis@falco_girgis·
Notice I have never once weighed in on this argument and still did not draw a conclusion for anyone from this data... My actual argument for or against the usage of virtual functions and their overhead is extremely context-dependent. When used properly, I argue that they are not only performant, but they are OPTIMAL. When used improperly... yeah, any per-function cost is too much overhead to incur (although god damn, they're faster than I thought on DC. lol) First of all, they are a form of RUNTIME polymorphism, and as such, they should only be used to solve problems that are actually runtime polymorphic, meaning that you cannot know the actual method to invoke on the object until runtime. Good examples of such scenarios are a plugin system or scripted behaviors for a game engine... I would argue that for this type of problem, not only are virtual functions fast as hell for the flexibility you're gaining, but they're also optimal. In such a scenario, what is even the alternative? You can do what C programmers have been doing for decades... which is create a structure of function pointers, store a pointer to the struct within the object, and call a "method" on it by dereferencing the pointer to the function pointer struct then the proper method... What have we achieved here? The same goddamn thing the C++ compiler does for you with a vptr and vtable... It's not going to be any more performant but will be less flexible... Now the alternative: what if you *do* know the type of the underlying object at compile-time? Then you are reaching for the wrong tool to solve the problem. You're using runtime polymorphism for a fundamentally compile-time polymorphic problem, and any overhead here is not justifiable for any high-performance application... A big example of this is device drivers for fixed platforms. Are you going to instantiate multiple types of CPUs or swap out peripherals at runtime? No? Consider reaching for an alternative tool. Unfortunately the C++ language doesn't allow you to express compile-time polymorphism as gracefully it does dynamic polymorphism with OOP... This is typically when I favor the "Curiously Recurring Template Pattern" in C++ or CRTP, which uses templates to resolve the proper method to invoke on the object statically at *compile-time*. Fortunately C++23 has recently added "deducing this" which makes expressing the CRTP more elegant.
English
3
2
24
2.5K
Falco Girgis
Falco Girgis@falco_girgis·
Are C++ virtual functions slow? It's time to settle the debate once and for all... By seeing how they perform on the Sega #Dreamcast! #cpp #retrocomputing
Falco Girgis tweet media
English
7
7
92
9.7K
Adrian Sanchez
Adrian Sanchez@pervasivesense·
I have a fresh existential crisis every time I hop on shadertoy.com. There's like full-on animated SDF + ray-marched scenes and all my brain can muster is slowing things down with exponential decay. Some crazy talented people in the world.
English
0
0
1
51
Adrian Sanchez
Adrian Sanchez@pervasivesense·
If you had the version control system equivalent of server-side program that tracked every action made within a custom operating system, and was able to track back through the entire action history, how crazy would that be?
English
0
0
0
73
Adrian Sanchez
Adrian Sanchez@pervasivesense·
Obviously there's a lot of newer tech in between, like stochastic sampling and upscaling, but most modern quality real-time GI approaches seem to have a low, constant ray budget.
English
0
0
0
50
Adrian Sanchez
Adrian Sanchez@pervasivesense·
Funny how we initially realized the rendering equation was too infeasible since tracing rays is too expensive, so many [genius] approximations were made for real-time lighting, then decades later we just said "screw it, we'll just trace less rays", and now GI looks amazing.
English
1
0
3
68
Adrian Sanchez
Adrian Sanchez@pervasivesense·
@karpathy Nanotech startup that seeks to feed millions with novel molecular processes but incites public fears of turning everyone into random Scandinavian dishes is still on my bingo card 😅
English
1
0
3
732
Andrej Karpathy
Andrej Karpathy@karpathy·
@pervasivesense Yeah a few newsgroups I browsed earlier seemed to go 🍌 worrying about it around the 90s
English
1
0
20
7.7K
Andrej Karpathy
Andrej Karpathy@karpathy·
Weekend reads. How about you? :)
Andrej Karpathy tweet media
English
248
111
3.4K
549.7K
Adrian Sanchez
Adrian Sanchez@pervasivesense·
Maybe I'm secretly working on a multi-course platform catered around how to build your own game engine with an accompanying MIT licensed engine that you can do whatever you want with. Maybe I'm not 🤷🏻‍♂️ Time will tell.
English
0
0
0
49
Adrian Sanchez
Adrian Sanchez@pervasivesense·
Really no better business model than a FOSS business model. You can make very profitable products centered around your own in-house software solutions and still make the software freely available. I get how it can be difficult, but anti-FOSS just globally nixes forward progress.
English
0
0
1
39