HN user

SotCodeLaureate

56 karma

Graphics Programming Enthusiast

<https://github.com/schaban>

sergey.chaban@gmail.com

Posts0
Comments30
View on HN
No posts found.

Thanks! Yeah, this one is supposed to be a very simple implementation for a kind of "how to write a machine code interpreter" tutorial, but I was looking to experiment with some optimizations if time permits. Patching with pre-baked alt-bytecode was one of the ideas indeed.

Couple years ago was experimenting with portable OpenGL rendering, and, interestingly of all platforms I had to deal with the Web was the easiest target :) - thanks to the excellent emscripten largely.

If interested, you can find the code/demo here: https://github.com/schaban/crosscore_dev (the link to the online demo is there in the README)

I'm going to start learning graphics for the first time

Vulkan is a quagmire of very low-level concepts, the danger of getting stuck in them and give up without learning anything is just too high.

At the same time making something with OpenGL that is more interesting than a simple rotating cube is not that difficult and you will get a lot of mid-level understanding - how rendering pipeline implemented and organized, what kind of task it is. "Porting" this knowledge to Vk is straightforward.

No I mean do full software rendering, no shaders, no graphics card.

But why?

There doesn't seems to be a lot to learn about applied linear algebra (in the sense discussed here) by implementing a rasterizer.

But there is plenty of LA above and below that (in the scene management, in the shaders).

Well, to make an (imperfect) analogy with programming tools - Houdini is like Emacs, while Blender is more like Visual Studio.

That is not to say that one is intrinsically better than the other, but for a technically-minded person (== any programmer in this case), the way Houdini works will make much more sense.

Learning either of these tools is not an easy task, but I think that starting with Houdini will feel more natural in cases like yours (SE background, interest in interactive graphics).

You can email me (see my profile here) for some more Houdini-talk!

terrain generation in OpenGL

Well, sounds like pretty interesting thing to do, so rewarding in itself maybe. Is it published on github or elsewhere?

Also, as someone doing graphics programming mostly as a hobby, I think a good thing to do is to learn the artistic side of things (to some extent), might give you some advantage.

I came across a russian translation of Shahnamah several years ago, that was published in 1950-60s, and it's in rhyming verses unlike most other Western translations that mostly resort to prose approximations.

Amazing experience, I even remember cross-referencing certain passages in Tajik edition to try to get some idea of original rhyming and rhythmic techniques mentioned by the translators (I don't know the language, but since it was written in Cyrillic I could get at least a general idea how it sounds).

For whatever reason I stopped right before the Iskandar (Alexander the G.) parts, have to get back to it someday.

at least tens of thousands of simulated AI agents

Are you planning on displaying all/most of them every frame, or just to control that many of them, then draw those nearby/visible?

If it's the former (but how exactly?) then perhaps Vk is the way to go, if the latter, then it's hard to see how Vulkan vs OpenGL is all that relevant here.

along the lines of Blender/Maya/Houdini

That's very interesting indeed, but arent's these lines are way too blurry?

That's why I'm using Houdini and not the other two.

And even then, Houdini is not set in stone, there were some significant changes during the years, an example of something that's probably most relevant here - say I prefer newer Wrangle operators in SOP rather than the classical visual programming style, but many Houdini people have the exact opposite preference.

SSE has scalar instructions - like "addss", "subss" etc.

These will be used by default (at O2 without vectorization enabled) for single-precision floating point math on x86-64 (where stack-based FPU is deprecated).

Vector instructions you're referring to end with "ps", they're very unlikely to be emitted for typical fp operations.

the compiler will never emit ... instructions like PSHUFB or PUNPCKxx

These are most certainly generated by GCC from C++ code (no intrinsics and such) - can even provide an evidence in the form of a codebase with appropriate build flags.

Their use is rather straightforward I think, but still.

Zig and WASM 4 years ago

sqlite ... 19x slower

But is this a failing of wasm or the system glue layer, that for something like sqlite/web has to go through js/browser/etc?

Yes, I understand the importance of real-life tests like this, but how one is expected to go about testing wasm performance as such other than using benchmarks that are mostly arithmetic/logic and not syscall-type code?

Zig and WASM 4 years ago

if the original uses highly-tuned x86 SIMD

BTW, if there is a problem with the current WASM performance, it's probably SIMD.

Again, based solely on my own benchmarks, exclusively in the area I'm interested in (game-type workload, so, say, multiplying many small matrices, performing geometric tests), there is little to no speed-up from wasm-simd128 (where it is supported), whereas native code compiled from the same sources, by the same compiler, profiled on the same machine, seems to be running a bit faster when vectorized.

Easy 6502 4 years ago

what do YOU not like about arm?

I find it difficult to read, it's aesthetics mostly, not necessary an architectural thing as such, the choice of mnemonics, why "ubfx", what's "rsb" - have to lookup these things constantly when I need them, while 6502 or x86 I can just open and read after all those years.

But that's just a personal preference certainly - yeah, I was fine with the abovementioned LDIR on Z80, heh.

Easy 6502 4 years ago

Hm, as a counter-example, I learned assembly languages in this order - Z80, x86, 6502, ARM, SuperH, MIPS (then some more). SH and MIPS I like the most, not because of delay slots specifically, but I do like the concept. (The one I "hate" is ARM.)

These are just standard OBJ files with diffuse textures only and trivial material settings (all white). Additional there is some metadata that specifies that the same data is to be used as displayable model and collision geometry.

So, essentially, this data is highly portable, photoreal aesthetics is not really a goal. (Also see some notes in the paper, e.g. "Limitations of the Dataset".)

No, you can't boot into ARM code without it. ARM part is disabled power-on, VPU is a general purpose processor really. Basically, on start-up it loads its start.elf (i.e. boot application compiled for its instruction set) from boot-media, initializes some hardware, then loads ARM boot image into common memory, then starts ARM. It also exposes some low-level hardware interface via syscall-type "mailbox" interface.