Why doesn't file glsl Extract to shader folder.

Author Topic: Why doesn't file glsl Extract to shader folder.  (Read 2488 times)

I wrote this script

Code: [Select]
//v1
function applyShaderSoft()
{
echo("Applying Shader Soft");
%destFile = new FileObject();
%destFile.openForWrite("shaders/soft_frag.glsl");
%destFile.openForWrite("shaders/soft_vert.glsl");

%sourceFile = new FileObject();
%sourceFile.openForRead("Add-Ons/client_ShaderSoft/soft_frag.glsl");
%sourceFile.openForRead("Add-Ons/client_ShaderSoft/soft_vert.glsl");
while(!%sourceFile.isEOF())
{
%destFile.writeLine(%sourceFile.readLine());
}

%sourceFile.close();
%sourceFile.delete();

%destFile.close();
%destFile.delete();

$Shader::ShadowName = "Soft";
     initializeShaderAssets();
     regenerateShadowMapFBOs();
     flushVBOCache();

}

if(getBuildNumber() != 1865)
{
warn("client_ShaderSoft: Shader Soft not applied, game version not supported.");
warn("   Game Version: " @ getBuildNumber());
warn("   Patch Version: Revision 1865");
return;
}
else
{
applyShaderSoft();
}

Console log:
Quote
Executing Add-Ons/client_ShaderSoft/client.cs.
Applying Shader Soft
ERROR: File "shaders/soft_frag.glsl" is not in one of the default directories
BackTrace: ->[CRPClient]onStart->[CRPClient]serverPart2->[CRPClient]initClient->[CRPClient]loadClientAddOns->applyShaderSoft
ERROR: File "shaders/soft_vert.glsl" is not in one of the default directories
BackTrace: ->[CRPClient]onStart->[CRPClient]serverPart2->[CRPClient]initClient->[CRPClient]loadClientAddOns->applyShaderSoft

Checking for shader shadow support:
   - Enabled via $Shader::Enabled? NO
   - ARB_shader_objects?           YES
   - ARB_shading_language_100?     YES
   - EXT_texture_array?            YES
   - EXT_texture3D?                YES
   - glTexImage3D?                 YES
   - EXT_framebuffer_object?       YES
   - ARB_shadow?                   YES
   - OpenGL Version?               3.3.0
   - GLSL Language Version?        3.30 NVIDIA via Cg compiler
   o Shaders are                   INACTIVE

Skipping shader shadow initialization.
Regenerating Shadow Map FBOs...
« Last Edit: September 28, 2013, 11:26:52 PM by Furling² »

I wrote this script

lel
furling i seriously hate to say this
you cant write to shaders
you cant.


Tawm wrote that script lines:
%destFile.openForWrite("shaders/common.glsl");
From Patches shader to fix overly bright point lights. It does worked extracted. I think I need add other function for each extract. If two extract files will not work.

%destFile.openForWrite("shaders/soft_frag.glsl");
%destFile.openForWrite("shaders/soft_vert.glsl");
they need to be separate and each one function.  I will re-write script later.

I don't think you understand what we're saying.
You CANNOT write to the /shaders/ folder through a script.
Blockland won't let you.

I don't think you understand what we're saying.
You CANNOT write to the /shaders/ folder through a script.
Blockland won't let you.
But, mom! Just let me try! I can.. you jus.. but.. you can't.

use some third party program to install them!

someone write a vbs script to download shaders from links and package them into a blockland mod

But, mom! Just let me try! I can.. you jus.. but.. you can't.

but... but... mom! I just need to add another function!

alright... I am going remove the link download and locking.