Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Example of JaGeX Code

Featured Replies


var KERNEL_SIZE=2;

var KERNEL_LOOP=KERNEL_SIZE/2-0.5;

var KERNEL_CONTRIBUTIONS=KERNEL_SIZE*KERNEL_SIZE;

//#GLSLSource

pub.buildShader=function(features) {

var shadowMapSampler = "\n"+

"const float shadowTexelSize=1.0/2048.0;\n"+

//When dot-producted with the packed values in the shadow map will produce a Z value in the range 0-1

"const vec4 bitShifts=vec4(1.0/(256.0*256.0*256.0),1.0/(256.0*256.0),1.0/256.0,1.0);\n"+

"float rand(vec2 co){\n"+

" return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);\n"+

"}\n"+

"float ShadowMapSamplerStochastic(vec4 sunShadowMapPosition, sampler2D sunShadowMap, float shadowStrength) {\n"+

" float shadowEffect;\n"+

" vec3 shadowMapTexel=sunShadowMapPosition.xyz/sunShadowMapPosition.w;\n"+

" shadowMapTexel.z-=shadowMapTexel.z*0.003;\n"+

" if (shadowMapTexel.x<0.0 || shadowMapTexel.x>1.0 || shadowMapTexel.y<0.0 || shadowMapTexel.y>1.0 || shadowMapTexel.z<0.0 || shadowMapTexel.z>0.45) shadowEffect=1.0;\n"+

" else {\n"+

" float shadowTotal=0.0, shadowMapDepth=0.0;\n"+

" vec2 lookupTexel;\n";

for (var pixelX=-KERNEL_LOOP; pixelX<=KERNEL_LOOP; pixelX+=1.0) {

for (var pixelY=-KERNEL_LOOP; pixelY<=KERNEL_LOOP; pixelY+=1.0) {

shadowMapSampler +=

" lookupTexel=shadowMapTexel.xy+shadowTexelSize*( vec2(cos(rand(sunShadowMapPosition.xy))+("+pixelX+"),sin(rand(sunShadowMapPosition.yx))+("+pixelY+")) );\n"+

" shadowMapDepth=dot(texture2D(sunShadowMap,lookupTexel),bitShifts);\n"+

" shadowTotal+=step(shadowMapDepth,shadowMapTexel.z)*shadowStrength;\n";

}

}

shadowMapSampler +=

" shadowEffect=max(1.0-(shadowTotal/"+KERNEL_CONTRIBUTIONS+".0),0.0);\n"+

" }\n"+

" return shadowEffect;\n"+

"}\n"+

};

Care to explain exactly what this is?

I'm seeing the word shadow a lot, seems to just be something about shadows on models or something like that, graphics related.

Seems to be some OpenGL/WebGL stuff.

 

Beats me though.

 

 

https://paste.bugabuse.net/view/1a326f37

Edited by YoHoJo

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.