How to load large arrays to gpu and render with OpenGL?

I am trying to make a volumetric rendering of a cloud. I have been defining the cloud density functions on the glsl shaders and performing ray-marching methods successfully. But now I would like to render a 3D grid (100x100x100) representing the density of a cloud that I calculated using the cpu. The idea that I was trying was to make use of the storage buffer objects, but when I access the array to get the density value and render it, it doesn’t work.

This is at the beginning of the glsl fragment:

#version 440 core layout(std430, binding = 3) buffer layoutName {     float data_SSBO[100*100*100]; }; 

And the density function definition is:

float density(vec3 position, float t){     const float dx = 1./100., dy = 1./100., dz = 1./100.;     int i, j, k;     if( (position.x >= 0.)&&(position.y >= 0.)&&(position.z >= 0.)&&(position.x <= 1.)&&(position.y <= 1.)&&(position.z <= 1.)){         i = int(position.x/dx);         j = int(position.y/dy);         k = int(position.z/dz);          return data_SSBO[i*100*100 + j*100 + k];     }     else         return 0.; } 

And in the c code there are the buffer creation, bindings, etc:

    glGenBuffers(1, &ssbo);     glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssbo);     glBufferData(GL_SHADER_STORAGE_BUFFER, 100*100*100*sizeof(float), grid, GL_STATIC_DRAW);     glBufferSubData(GL_ARRAY_BUFFER, 0, 100*100*100*sizeof(float), grid); 

and in the rendering function there is:

    glClearColor(1.f, 1.f, 0.f, 1.0f);      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);       glBindBuffer(GL_ARRAY_BUFFER, VBO);       glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssbo);      glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 3, ssbo);  //  glBufferSubData(GL_ARRAY_BUFFER, 0, 3*2*2*sizeof(float), buffer);        glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 2* sizeof(float), (void*)0);      // coordenadas      glEnableVertexAttribArray(0);         glUseProgram(shaderProgram); 

I believe the problem has to do with the binding, I have been trying different combinations, like binding after and before glUseProgram, etc. I literally have no idea what is wrong, I see this is really confusing.

How we can render the same parent top global navigation bar in SharePoint Hosted app On-Premise 2019

I need to render the same parent top global navigation bar in the **SharePoint Hosted app On-Premise 2019 **.

  • I have already included a master page link in the default.aspx page in SharePoint Hosted app.

<%@ Page Inherits=”Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c” MasterPageFile=”~site/_catalogs/masterpage/Sampleapp.master” Language=”C#” %>

  • Parent Site

enter image description here

  • SharePoint Hosted App

enter image description here

Intel HD Graphics 530 with i915 dirver render latency

I have an desktop with Ubuntu 18.04 installed and only Intel HD Graphics 530 graphics card. It seems that i915 driver installed automatically and works however, it seems that there is lag (latency) in rendering (smth about ~100ms) which is especially noticeable when dragging mouse.

When using windows on the same computer there is no such problem.

How can investigate, where can be problem?

Render Blocking Script

It is a random-post widget script. When checked with speed tool, the javascript: was remarked as a render blocking JS.

I tried adding either both "asyn" and "defer" in the script. And the widget disappeared.

How do I fix this?

Interpolation of render with fixed physics update

In Fix Your Timestep, they briefly address the remainder time in relation to rendering. Saying that remainder can be used to generate an interpolated rendering.

We can use this remainder value to get a blending factor between the previous and current physics state simply by dividing by dt. This gives an alpha value in the range [0,1] which is used to perform a linear interpolation between the two physics states to get the current state to render.

So let’s say your last two physics updates we’ll call A and B are from 00:10.033 and 00:10.066, and it is now 00:10.070 when we want to perform a render. We have a remainder of .004.

I take “interpolation between the two physics states” to mean we compare all the objects in update A and B and slide them back from B towards A by 88% (.033-.004)/.033). This would mean I’m actually rendering the physical state at 00:10.037, correct? So my physics updates A and B are really more like “previous” and “next” and my interpolation is between the previous and the next, correct?

Upgraded to Unity 2018.4.6f1, many cameras, some with deferred rendering, surfaces now render as white. Very baffling

We have a rather conventional set up to start with:

Main Camera (everything but UI layer, depth 0, deferred, has post-processing)     GUI Camera (only UI layer, depth-only clear, depth 1, forward) 

We also allow screen recording, so we have another pair of cameras, but with different depths:

Recording Main Camera (everything but UI layer, depth -1, deferred, has post-processing)     Recording GUI Camera (only UI layer, depth-only clear, depth -2, forward) 

Before the upgrade, everything worked great. After the upgrade:

enter image description here

We have fiddled a bunch, and results are very peculiar:

  • Turning HDR on with ANY camera will invert the white shading to black shading. enter image description here
  • Disabling any camera will return the game to its proper appearance (obviously not the main camera, since we need that to see anything!).
  • Disabling post-processing on both cameras that have it doesn’t change anything. In fact, post-processing doesn’t seem to be part of the problem at all.
  • Setting the main camera within each pair of cameras to Forward returns that view to normal.
  • Setting all cameras to deferred does not do anything.
  • Moving a pair of cameras, such as the recording camera, to another display returns the game to normal.
  • Setting the lowest-depth camera to deferred and the others as forward renders the game correctly. But putting any camera before the deferred camera causes everything to go white/black.
  • Rendering the recording camera to a render texture returns the game to normal.

It appears that deferred cameras are all sorts of janky now, especially in Unity 2019. Supposedly they have made a whole new ways to layer cameras for a future version of 2019. We wanted to upgrade to 2019.2, unfortunately, 2019 seems to have a slew of issues from rendering to DLL management, and we were unable to upgrade due those issues. 2019.2 wouldn’t have helped us in this issue anyway, because the new layer cameras functionality isn’t live yet.

We are using deferred because we have a lot of lighting effects, and deferred helps frame rate a lot in that regard. Giving up on deferred rendering is unlikely an option.

How can I render a RichImageField as a ‘s CSS background image (without JavaScript)?

I am creating Sharepoint page layouts using a text editor (company won’t allow me to install Sharepoint Designer). In one of my layouts, users can add an image using a RichImageField. My layout code looks like this:

<PublishingWebControls:RichImageField FieldName="PublishingPageImage" runat="server"/>

I would like this field to alter the background-image CSS property of a <div> rather than simply render as a standard HTML <img> tag. I know I can easily accomplish this with JavaScript, but I was wondering if there was a way of doing this at the page-layout template level?

In my ideal world it would be something like this:

<div id="hero" style="background-image:url('$ {RichImageField.src}')">My Hero Area</div>

So, to reiterate: Is it possible to render a RichImageField as a div’s CSS background image (without JavaScript)?

paginar con render() ajax y laravel

Hola estoy intentando paginar una tabla Mysql, estoy utilizando ajax pero cuando utilizo ajax no puedo obtener la respuesta del controlador mediante blade,solo me llega la respuesta a Javascript. Deseo obtener en blade lo que la peticion ajax me devuelve.

Mi vista :

<table class="mi_tabla" class="display" style="width:100%"> 

@if(isset($ personas))
@foreach($ personas as $ persona) {{$ persona->nombre}} {{$ persona->apellido}} {{$ persona->cedula}} @endforeach @endif

Mi Modelo:

class Personas extends Model 

{ protected $ table=’clientes’; protected $ primaryKey=’id’; public $ timestamps=false; }

Mi controlador :

class Busqueda extends Controller 


public function proceso(Request $  request) {     $  personas = Personas::all();     return response()->with('personas',$  personas); } 


Mi Peticion Ajax .

$ .ajaxSetup({

    headers: {         'X-CSRF-TOKEN': $  ('meta[name="csrf-token"]').attr('content')     }  }); 

$ (‘.enviar’).click(function(event) {

$ (‘.mi_tabla’).html(“NombreApellidoCedulaOpciones”);

$ .post(‘ajax’, {}, function(data, textStatus, xhr) {




How to render HTML value e.g “Go to GoogleSearch on spfx react project”, in SPFX project using type script?

We have created spfx react project for SharePoint online using type script:

Here, props.appendTextDetails value is “Go to GoogleSearch on spfx react project”.

const FCRichtext = (props:any) => {

return <div>   <Label>{props.appendTextDetails}</Label> </div> 

}; export default FCRichtext;

How can we render the HTML value?

Product page fails to render

When you click on a product page, it only shows a one image. Looking at the stack trace, it looks like there is some PHP error. I think when I patched to 2.3.2, maybe something didn’t updated? How do I recover?

eg. click the product, then it is only the product image showing afterwards. enter image description here

<div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder"> <img alt="main product photo" class="gallery-placeholder__image" src="" /> </div>  <script type="text/x-magento-init"> { "[data-gallery-role=gallery-placeholder]": { "mage/gallery/gallery": { "mixins":["magnifier/magnify"], "magnifierOpts": {"fullscreenzoom":"5","top":"","left":"","width":"","height":"","eventType":"hover","enabled":false}, "data": [{"thumb":"https:\/\/\/pub\/media\/catalog\/product\/cache\/155e93c92386e3c82347ea16620ccbd3\/j\/b\/jb-rebuild_1000x1000.png","img":"https:\/\/\/pub\/media\/catalog\/product\/cache\/85991805028918d3c76d0ac026e0a79d\/j\/b\/jb-rebuild_1000x1000.png","full":"https:\/\/\/pub\/media\/catalog\/product\/cache\/8626c40ec5098cb7aa441a37fc63fc11\/j\/b\/jb-rebuild_1000x1000.png","caption":"SteamSpeed Journal Bearing Rebuild Kit for MHI Compatible CHRA","position":"1","isMain":true,"type":"image","videoUrl":null}], "options": <br /> <b>Fatal error</b>: Uncaught Error: Call to a member function getOptionsJson() on null in /var/www/vhosts/ Stack trace: #0 /var/www/vhosts/ include() #1 /var/www/vhosts/ Magento\Framework\View\TemplateEngine\Php-&gt;render(Object(Magento\Catalog\Block\Product\View\Gallery\Interceptor), '/var/www/vhosts...', Array) #2 /var/www/vhosts/ Magento\Framework\View\Element\Template-&gt;fetchView('/var/www/vhosts...') #3 /var/www/vhosts/ Magento\Catalog\Block\Product\View\Gallery\Interceptor-&gt;fetchView('/var/www/vhosts...') #4 /var/www/vhosts/ in <b>/var/www/vhosts/</b> on line <b>48</b><br />