Posts

Showing posts from 2011

Lets learn pixel shaders - Chap 2 - Basics

Image
Important - To move forward open another tab in your browser and open the URL  http://www.iquilezles.org/apps/shadertoy/ , I will refer to this tab simply as 'Shader Toy' Chapter 2 - Basics of pixel shader with 'Shader toy' Let us write some code, switch to the shader toy and notice that the " Deform " shader is already loaded and is running by default. On the right side bottom you see the source code, and on the left is the rendered effect. Take some time to notice the various details/controls shown to you like 1) fps , time, play/pause button, restart button on top of render area (place where the effect is played). 2) Dimensions panel - Width and height of the render area on top it. You can change it if you want. 3) The textures passed to the pixel shader are given right to the width/height box. You can pass up to 4 textures and use them in the pixel shader. The texture used in deform shader is given in the box 'unit 0'. Copy paste that UR

Lets learn pixel shaders! - New Series - Chapter 1

Image
This is the beginning of a series of tutorials, about pixel shaders (aka fragment shaders) with WebGL. I will start by assuming you are someone who has "absolutely no experience in graphics programming", but you should know what pixels are, what their components are. And optionally if you have basic 3d texturing knowledge, it will help a lot, but again not compulsory. Without more blah, blah, let us start learning fellow programmers! Thanks to  http://www.iquilezles.org/apps/shadertoy/ without which I would have never even started this! All our tutorials will be explain with reference to that web app. You will need one of the latest browser to run it. Chapter 1 - Pre-requisite (for the n00b graphics programmer) Pixels (skip if you know) Everything you see on your monitor is made of pixels. If you zoom into your computer monitor, basically it is made of basic blocks (usually square shaped) called pixels. But as they are very small and closely packed, you ar

XCode 4 icon

Image
Like me if you have installed both XCode3 and XCode4, and you wanna have both in the dock, you will find having the same icon is confusing, so here is a custom icon which you can use. Right click XCode.app and click "Show Package Contents" and after that navigate to "Contents/Resources" and replace the existing Xcode.icns with this one. Download Custom Xcode.icns file .

Download Android SDK standalone for offline installation

Update :- SDK for Android version (6.0) added ! How to install Android SDK without internet connection I searched all over the internet and found no posts like this, hence I'm making one hoping it would be helpful for a lot of people. The magic URL used to be  - http://dl-ssl.google.com/android/repository/repository.xml  (Outdated) That is the XML file from which the URL for downloading the SDK packages are obtained. Update :- The previous URL is now invalid, the new URL is given below https://dl-ssl.google.com/android/repository/repository-5.xml  (Outdated) Update 4  :- New URL https://dl-ssl.google.com/android/repository/repository-10.xml  (thanks topcoder from comments) Update 5  :- New URL https://dl-ssl.google.com/android/repository/repository-12.xml For e.g. if you want to download Android SDK for version 4.0.3 for all platforms, you could look up that XML file. You will find a block under tag SDK 4.0.3 like this <sdk:archive arch="any"

Pointer not declared even when declared !

Image
A Strange problem encountered yesterday which left us puzzled for a few mins :) (Check image below) So now, we tried everything possible. Until at last when we saw that there was a backslash after "Plist" in the comment line. As backslash is an escape sequence, it made the whole next line invalid, more like a comment. Once we deleted that backslash, things were back to normal. But hey, aren't comments supposed to suppress anything in them including escape characters

How to ignore build directory in SVN from command line

This works for Windows/Mac/Linux, but its tested on Mac. On Windows, you can do it easily with Free TortoiseSVN Shell context menu, so this method will be useful on Mac/Linux. Lets suppose your folder structure is SVNfolder->trunk->development->Projectfolder->build Now open terminal and cd to development. (Now if you 'ls' it wil' list Projectfolder) type svn propset svn:ignore "build" Projectfolder/  and press Enter. and that is it, your build folder will be ignored.