<commit_before>/*
===========================================================================
Copyright (C) 2006-2011 <NAME> <<EMAIL>>

This file is part of XreaL source code.

XreaL source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

XreaL source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with XreaL source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
===========================================================================
*/

/* lighttile_fp.glsl */

IN(smooth) vec2 vPosition;
IN(smooth) vec2 vTexCoord;

struct light {
  vec3  center;
  float radius;
  vec3  color;
  float type;
  vec3  direction;
  float angle;
};

#ifdef HAVE_ARB_uniform_buffer_object
layout(std140) uniform u_Lights {
  vec4 lightvec[ MAX_REF_LIGHTS * 3 ];
};
light GetLight(in int idx) {
  light result; vec4 component;
  idx *= 3;
  component = lightvec[idx++];
  result.center = component.xyz; result.radius = component.w;
  component = lightvec[idx++];
  result.color = component.xyz; result.type = component.w;
  component = lightvec[idx++];
  result.direction = component.xyz; result.angle = component.w;
  return result;
}
#else
uniform sampler2D u_Lights;
vec2 idxToTC( in int idx, int w, int h ) {
  return vec2( ( float(idx) + 0.5 ) * ( 1.0 / (w * h) ),
               ( float(idx) + 0.5 ) * ( 1.0 / w ) );<commit_msg>Fix types of parameters to function idxToTC.<commit_after>/*
===========================================================================
Copyright (C) 2006-2011 <NAME> <<EMAIL>>

This file is part of XreaL source code.

XreaL source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

XreaL source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with XreaL source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
===========================================================================
*/

/* lighttile_fp.glsl */

IN(smooth) vec2 vPosition;
IN(smooth) vec2 vTexCoord;

struct light {
  vec3  center;
  float radius;
  vec3  color;
  float type;
  vec3  direction;
  float angle;
};

#ifdef HAVE_ARB_uniform_buffer_object
layout(std140) uniform u_Lights {
  vec4 lightvec[ MAX_REF_LIGHTS * 3 ];
};
light GetLight(in int idx) {
  light result; vec4 component;
  idx *= 3;
  component = lightvec[idx++];
  result.center = component.xyz; result.radius = component.w;
  component = lightvec[idx++];
  result.color = component.xyz; result.type = component.w;
  component = lightvec[idx++];
  result.direction = component.xyz; result.angle = component.w;
  return result;
}
#else
uniform sampler2D u_Lights;
vec2 idxToTC( in int idx, float w, float h ) {
  return vec2( ( float(idx) + 0.5 ) * ( 1.0 / (w * h) ),
               ( float(idx) + 0.5 ) * ( 1.0 / w ) );
{'fraction_non_alphanumeric': 0.16580732700135686, 'fraction_numerical': 0.02333785617367707, 'mean_word_length': 4.235795454545454, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1364042', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1060, 'n_words': 434}