Lesley Lai

@lesley@mastodon.gamedev.place
572 Followers
637 Following
1.8K Posts

Computer Graphics & Programming Languages person.

I twoot about languages like C, C++, Rust, JS/TS, and OCaml.

I organize @graphicsmeetup

he/him

websitehttps://lesleylai.info
githubhttps://github.com/LesleyLai
noteshttps://notes.lesleylai.info/

I don't even know which AdBlocker filter to use to block this now unless I want to block all warning banners.

At least I am migrating away from this hell site now. I started using GitHub shortly after I started learning coding. It feels like the end of an era.

#caturday

Timo grows fast

Made some updates to my old grass renderer after reading a recent blog post on grass rendering. Clumping the grass with noise and adding specular highlights makes it look much better

https://hexaquo.at/pages/grass-rendering-series-part-2-full-geometry-grass-in-godot/

Grass Rendering Series Part 2: Full-Geometry Grass in Godot

In this second part of the Grass Rendering series, we’ll go over one possible implementation of grass in Godot. It will be full-geometry grass, meaning that each grass blade is an actual 3D object. This is in contrast to the also very popular billboard grass, where multiple blades of grass (or other plants) are drawn onto a transparent texture, which is rendered onto quads scattered across the ground. If you haven’t read part 1, I’d recommend to check that our first: Grass Rendering Series Part 1: Theory

Newly adopted kitten. His name is Timo.
#catsofmastodon
Social media tip: Don’t hesitate to mute "hot topics", whether you care about them or not. Prioritizing your mental well-being is what matters most. Mastodon also offers a great feature to hide posts about a topic without completely removing them and to set an expiration time.

TIL that you can't perform an assignment in the second branch of a ternary operator because ternary has higher precedence than assignment.

On a related note, I'm pretty happy with how my toy C compiler reports errors now—it almost looks like GCC and Clang, at least for these simple cases.

#PLdev #compilerdev

Spent half an hour debugging this

Edit: I can't blame C's array-to-pointer decay, as `children` is already a pointer

Oh no
PBRT, why use omega as regular frequency when everyone else uses it as angular frequency? 😩

I spent a few hours creating an end-to-end testing driver for my C compiler project. Initially, I considered using Python but opted for Rust instead. It turned out to be surprisingly well-suited for this kind of "scripting" task.

#pldev

https://github.com/LesleyLai/mcc/tree/main/test

mcc/test at main · LesleyLai/mcc

Mini C Compiler. Contribute to LesleyLai/mcc development by creating an account on GitHub.

GitHub