andrewray
andrewray on Hacker News
Posted by
andrewray on Tuesday September 15, 2026 @09:34AM
from the show-hn dept.
Taking shader programs (they have a main() functions), hacking up their source code / AST to turn the into modularized code packages, and then enabling composition of shaders by injecting the output of one module into another (essentially calling the main function of one shader in another). This enables arbitrary shader composition. One application is Photoshop-style stacking of shaders as layers, like
https://shaderfrog.com/2/editor/cm6y90vai002mpaxio3zjhfvqOr getting real freaky with it by composing many effects deep https://shaderfrog.com/2/editor/cm1s7w23w000apar738s9d1x0
Posted by
andrewray on Friday April 26, 2024 @10:08PM
from the prisma.io dept.
It's been my experience, especially in the startup scene where business requirements change often, that `git blame` rarely shows you what you want. Files get renamed, moved, re-indented, etc, frequently.
I wrote a tutorial on a more effective (at least for me) solution to find the true author of a change: http://blog.andrewray.me/a-better-git-blame/
If your branch conflicts, rebase off master (the branch you're making a pull request to). Then it will merge cleanly. There's no practical downsides to having merge commits in master, but you should never (or rarely) see merge conflict resolution commits. You should be able to rebase to a mergeable state before merge.
I've always heard good things about Vue from its users. I have to compare all Javascript frameworks to React, because to me React feels like the first framework that got it "right." The API of React is surprisingly thin. Looking at Vue templates, the syntax seems quite alien, halfway between Django and Angular:
<th v-for="key in columns" @click="sortBy(key)" :class="{active: sortKey == key}">
And the API seems to needlessly separate HTML and Javascript, with some strange (to a newcomer) API calls:
Vue.component('demo-grid', { // moving away from JS classes
template: '#grid-template', // Why separate view code from view code?
replace: true, // what is this?
Has anyone heavily used React and Vue and have an argument for what this thicker API affords?
Cars seem fundamentally different than his other examples: Spacecraft, underwater vehicles, and airplanes. The importance difference is cars have a clear, visual grid of where they can travel and where they cannot travel. Painted lines on the road and navigational signs provide a construct of the environment around them.
Maybe the closest comparison is subway / metro rails. There are already many fully automated subway systems: https://en.wikipedia.org/wiki/List_of_automated_urban_metro_...
This seems to take the declarative nature of SVG and make it more imperative, like HTML5 Canvas, even though it ironically uses a virtual DOM implementation under the hood. For my React projects I chose SVG over canvas because I could write my layout declaratively, and avoided imperative manipulation libraries. How do you modify existing SVG shapes with this library?
Remove the ?currentPage=all from the URL to get the non-broken version of the link.
This may be a silly question, but could you elaborate on why you prefer the project to be open sourced? I'm keeping it closed source now for potential business and security reasons.
All shaders are beautiful :)
This is a problem with user content submitted sites. It's hard not to conflate the quality of the content (shaders) with the quality of the product (ShaderFrog). There are no default ShaderFrog shaders, they're all user created.
The more oddball shaders (my favorites) are the composed shaders, which are not eligible to be used as inputs to other composed shaders. Only the basic shaders, which are generally higher quality because they require more knowledge of how GLSL works, can be inputs to composed shaders.
Posted by
andrewray on Tuesday September 08, 2015 @11:45AM
from the shaderfrog.com dept.
Posted by
andrewray on Wednesday July 08, 2015 @01:52PM
from the blog.andrewray.me dept.